1
0
Fork 0
remarkable-linux/net/rfkill
Mika Westerberg 72daceb9a1 net: rfkill: gpio: Add default GPIO driver mappings for ACPI
The driver uses devm_gpiod_get_index(..., index) so that the index refers
directly to the GpioIo resource under the ACPI device. The problem with
this is that if the ordering changes we get wrong GPIOs.

With ACPI 5.1 _DSD we can now use names instead to reference GPIOs
analogous to Device Tree. However, we still have systems out there that do
not provide _DSD at all. These systems must be supported as well.

Luckily we now have acpi_dev_add_driver_gpios() that can be used to provide
mappings for systems where _DSD is not provided and still take advantage of
_DSD if it exists.

This patch changes the driver to create default GPIO mappings if we are
running on ACPI system.

While there we can drop the indices completely and use devm_gpiod_get()
with name instead.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-11-04 21:58:24 +01:00
..
Kconfig net: rfkill: gpio: clean up clock handling 2013-10-28 15:05:24 +01:00
Makefile net: rfkill: add generic gpio rfkill driver 2011-05-19 13:53:54 -04:00
core.c net: rfkill: kernel-doc warning fixes 2014-10-08 15:24:15 -04:00
input.c rfkill: don't use [delayed_]work_pending() 2012-12-28 13:40:16 -08:00
rfkill-gpio.c net: rfkill: gpio: Add default GPIO driver mappings for ACPI 2014-11-04 21:58:24 +01:00
rfkill-regulator.c net: rfkill: Do not ignore errors from regulator_enable() 2013-08-15 18:17:05 +02:00
rfkill.h rfkill: rewrite 2009-06-03 14:06:13 -04:00