diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2014-11-03 13:01:32 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-11-04 11:18:52 +0100 |
commit | 354567e6084c0760dc1e3a164ce4e77c5a943acc (patch) | |
tree | c2645d3c9e71da01ab64eb93d363eb4094ec8bb8 /virt/kvm/arm | |
parent | ee76a9abde4f428a3d342822301ddb8d080d6557 (diff) | |
download | op-kernel-dev-354567e6084c0760dc1e3a164ce4e77c5a943acc.zip op-kernel-dev-354567e6084c0760dc1e3a164ce4e77c5a943acc.tar.gz |
gpio / ACPI: Add knowledge about pin controllers to acpi_get_gpiod()
The GPIO resources (GpioIo/GpioInt) used in ACPI contain a GPIO number
which is relative to the hardware GPIO controller. Typically this number
can be translated directly to Linux GPIO number because the mapping is
pretty much 1:1.
However, when the GPIO driver is using pins exported by a pin controller
driver via set of GPIO ranges, the mapping might not be 1:1 anymore and
direct translation does not work.
In such cases we need to translate the ACPI GPIO number to be suitable for
the GPIO controller driver in question by checking all the pin controller
GPIO ranges under the given device and using those to get the proper GPIO
number.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'virt/kvm/arm')
0 files changed, 0 insertions, 0 deletions