gpiolib: translate pin number in GPIO ACPI callbacks
authorqipeng.zha <qipeng.zha@intel.com>
Tue, 10 Mar 2015 17:15:38 +0000 (01:15 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 19 Mar 2015 08:22:53 +0000 (09:22 +0100)
commit4de60970abf9f49737f51ec6e7a1e3bcf6d36742
tree5dc0acbc100f760505980951f3a90d6fc5f6cba8
parent32c006a99799f6f3c759b77ba761c3a5981e34eb
gpiolib: translate pin number in GPIO ACPI callbacks

If GPIO driver use pin mapping, need to translate pin number
between ACPI table and GPIO driver.

This issue is found on one platform with Cherryview gpio
controller, kernel is hang when executed _PS0 method of
one ACPI device, since without this translation, it access
invalid gpiodesc array.

Verified it works again with this patch.

Signed-off-by: qipeng.zha <qipeng.zha@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-acpi.c