pinctrl: intel: Do pin translation in other GPIO operations as well
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 18 Sep 2018 15:36:21 +0000 (18:36 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 20 Sep 2018 15:21:52 +0000 (08:21 -0700)
commit96147db1e1dff83679e71ac92193cbcab761a14c
treefae535aee78745d578e851c541c611389c11a5cf
parent8e2aac333785f91ff74e219a1e78e6bdc1ef2c41
pinctrl: intel: Do pin translation in other GPIO operations as well

For some reason I thought GPIOLIB handles translation from GPIO ranges
to pinctrl pins but it turns out not to be the case. This means that
when GPIOs operations are performed for a pin controller having a custom
GPIO base such as Cannon Lake and Ice Lake incorrect pin number gets
used internally.

Fix this in the same way we did for lock/unlock IRQ operations and
translate the GPIO number to pin before using it.

Fixes: a60eac3239f0 ("pinctrl: intel: Allow custom GPIO base for pad groups")
Reported-by: Rajat Jain <rajatja@google.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Rajat Jain <rajatja@google.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/intel/pinctrl-intel.c