On Wed, Oct 08, 2014 at 10:34:38AM +0200, Loic Poulain wrote: > Some GPIO based rfkill devices can wake their host up from suspend by > toggling an input (from the host perspective) GPIO. > This patch adds a generic support for that feature by registering a > threaded interrupt routine and thus setting the corresponding GPIO as a > wake up source. > > Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxx> > --- > net/rfkill/rfkill-gpio.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 49 insertions(+) To continue my previous answer, for this you could have the following _DSD.. Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"host_wake-gpio", Package () {^BTH1, 0, 0, 0}}, Package () {"reset-gpio", Package () {^BTH1, 1, 0, 0}}, Package () {"shutdown-gpio", Package () {^BTH1, 2, 0, 0}}, } }) And in the driver you can then request it without caring about the index.. ... gpio = devm_gpiod_get_index(dev, "host_wake", 3); if (!IS_ERR(gpio)) { ret = gpiod_direction_input(gpio); if (ret) return ret; rfkill->irq = gpiod_to_irq(gpio); ... Actually, we could just use devm_gpiod_get instead of devm_gpiod_get_index in this case. Cheers, -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html