aboutsummaryrefslogtreecommitdiff
path: root/net/rfkill/rfkill-gpio.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-28net: rfkill: gpio: add ACPI supportHeikki Krogerus1-1/+30
Including ACPI ID for Broadcom GPS receiver BCM4752. Signed-off-by: Heikki Krogerus <[email protected]> Acked-by: Rhyland Klein <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-10-28net: rfkill: gpio: prepare for DT and ACPI supportHeikki Krogerus1-41/+51
This will add the relevant values like the gpios and the type in rfkill_gpio_platform_data to the rfkill_gpio_data structure. It will allow those values to be easily picked from DT and ACPI tables later. Signed-off-by: Heikki Krogerus <[email protected]> Acked-by: Rhyland Klein <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-10-28net: rfkill: gpio: spinlock-safe GPIO accessHeikki Krogerus1-8/+8
This sets the direction of the gpio once when it's requested, and uses the spinlock-safe gpio_set_state() to change the state. Signed-off-by: Heikki Krogerus <[email protected]> Acked-by: Rhyland Klein <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-10-28net: rfkill: gpio: clean up clock handlingHeikki Krogerus1-27/+8
Use a simple flag to see the state of the clock, and make the clock available even without a name. Also, get rid of HAVE_CLK dependency. Signed-off-by: Heikki Krogerus <[email protected]> Acked-by: Rhyland Klein <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-10-28net: rfkill: gpio: convert to resource managed allocationHeikki Krogerus1-55/+20
And remove now unneeded resource freeing. Signed-off-by: Heikki Krogerus <[email protected]> Acked-by: Rhyland Klein <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-04-22rfkill: fix error return code in rfkill_gpio_probe()Wei Yongjun1-2/+5
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> [fix some indentation on the way] Signed-off-by: Johannes Berg <[email protected]>
2012-12-06rfkill: remove __dev* attributesBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <[email protected]> Cc: Johannes Berg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-04net/rfkill/rfkill-gpio.c: introduce missing kfreeJulia Lawall1-1/+1
Error handling code following a kmalloc should free the allocated data. The label fail_alloc already does this for rfkill. A simplified version of the semantic match that finds the problem is as follows: (http://coccinelle.lip6.fr) // <smpl> @r exists@ local idexpression x; statement S; identifier f1; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } x->f1 ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-11-30net: rfkill: convert net/rfkill/* to use module_platform_driver()Axel Lin1-12/+1
This patch converts the drivers in net/rfkill/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: "David S. Miller" <[email protected]> Cc: "John W. Linville" <[email protected]> Cc: Johannes Berg <[email protected]> Cc: Antonio Ospite <[email protected]> Cc: Rhyland Klein <[email protected]> Signed-off-by: Axel Lin <[email protected]> Acked-by: Rhyland Klein <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-10-03net:rfkill: add a gpio setup function into GPIO rfkillSangwook Lee1-0/+11
Add a gpio setup function which gives a chance to set up platform specific configuration such as pin multiplexing, input/output direction at the runtime or booting time. Signed-off-by: Sangwook Lee <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-05-19net: rfkill: add generic gpio rfkill driverRhyland Klein1-0/+227
This adds a new generic gpio rfkill driver to support rfkill switches which are controlled by gpios. The driver also supports passing in data about the clock for the radio, so that when rfkill is blocking, it can disable the clock. This driver assumes platform data is passed from the board files to configure it for specific devices. Original-patch-by: Anantha Idapalapati <[email protected]> Signed-off-by: Rhyland Klein <[email protected]> Signed-off-by: John W. Linville <[email protected]>