summaryrefslogtreecommitdiff
path: root/net/rfkill/rfkill-gpio.c
AgeCommit message (Collapse)AuthorFilesLines
2014-05-15WORKAROUND: ARM: dts: add clock property on bt device nodedevel/tizenBeomho Seo1-3/+4
WORKAROUND: Temporary workaround for bluetooth enable. This patch add clock property on rfkill_bt device node. And then, add parse function in rfkill-gpio driver. Change-Id: I8928cf73284c5e56f8b5671cdb8485ac39b7f0e7 Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
2014-05-15WORKAROUND: net: rfkill-gpio: add low power mode for bluetooth chipBeomho Seo1-0/+110
WORKAROUND: Temporary workaround for bluetooth enable. This patch add LP mode for bluetooth chip. Change-Id: I1badf49085e58cec08704581beb0458ffbeaee64 Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2014-05-15WORKAROUND: net: rfkill-gpio: add host wake and wake pinsBeomho Seo1-0/+99
WORKAROUND: Temporary workaround for bluetooth enable. The wake pin is used for waking up the hw and host wake pin is used for waking up host processor during sleep. Additionally, This patch add reset-gpio property and devm_gpio_request_one function. Change-Id: I3695fce3b5c6162c9bad5fa0721df9bd8df505c7 Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2014-05-15WORKAROUND: net: rfkill-gpio: fix initial state as blockedSeung-Woo Kim1-0/+4
WORKAROUND: Temporary worgaround for bluetooth enable. Initial state is not set as blocked, so it is always unblocked after booting. This patch fixes initual state of rfkill-gpio as blocked. Change-Id: Ide67763d10e2ef3ea75fe58d917cd725b26e2cab Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2014-05-15WORKAROUND: ARM: dts: add rfkill-bluetooth device nodeBeomho Seo1-0/+1
WORKAROUND: Temporary workaround for bluetooth enable. This patch add rfkill-bluetooth device node and pinctrl. And then, add line for parse shutdown-gpio. Change-Id: I1263b020f7c939a65a95c7a5b94e379a7a51210f Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
2014-05-15net: rfkill: gpio: add device tree supportChen-Yu Tsai1-1/+24
Change-Id: Ic179fcf929d3555a29addd39024011537ea041fa Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2014-05-15net: rfkill: gpio: fix reversed clock enable stateChen-Yu Tsai1-1/+1
rfkill-gpio has clk_enabled = blocked, which is true when rfkill blocks the device. This results in calling clock enable/disable at the wrong time. Reversing the value fixes this. Change-Id: Id13a2bd8d7314b29753d2cdedca62b27fa9fd1d9 Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2014-05-15net: rfkill: gpio: use clk_prepare_enable/clk_disable_unprepareChen-Yu Tsai1-2/+2
rfkill-gpio calls clk_enable() without first calling clk_prepare(), resulting in a warning and no effect. Switch to clk_prepare_enable() and clk_disable_unprepare. Change-Id: I4cb7ed7ff551daab034deb300f6def1c44721fe3 Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2014-05-08net: 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. Change-Id: I0851561b648c52be17dbe9a7bb01b0b62ff621a6 Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Rhyland Klein <rklein@nvidia.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-05-08net: 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. Change-Id: I1e9e9035dc9451d7531d230645d5f1572130a77b Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Rhyland Klein <rklein@nvidia.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-05-08net: 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. Change-Id: Ie113c861a296a57ff32f5a3ee95ef0b9d9fff7e4 Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Rhyland Klein <rklein@nvidia.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-05-07net: rfkill: gpio: convert to resource managed allocationHeikki Krogerus1-55/+20
And remove now unneeded resource freeing. Change-Id: Ie6baa61361effe095de95c5ac19cd19f6ddf4475 Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Rhyland Klein <rklein@nvidia.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
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 <yongjun_wei@trendmicro.com.cn> [fix some indentation on the way] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
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 <wfp5p@virginia.edu> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <julia@diku.dk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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" <davem@davemloft.net> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Antonio Ospite <ospite@studenti.unina.it> Cc: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <sangwook.lee@linaro.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <aidapalapati@nvidia.com> Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>