]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "pinctrl: intel: Do pin translation when lock IRQ"
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 24 Sep 2018 14:32:12 +0000 (17:32 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 25 Sep 2018 10:50:00 +0000 (12:50 +0200)
commitf0c4e534e523b6b098dcb9ed91f5d3eef08be46b
treeb6b414a086e3abec185cb6aa01f86ce9c6741460
parent84e410f9160273b2a2f1e492342d42ba9008f780
Revert "pinctrl: intel: Do pin translation when lock IRQ"

This reverts commit a6f3670b015940bc972f81cef5ef8357200f234a.

Commit a6f3670b0159 ("pinctrl: intel: Do pin translation when lock IRQ")
added special translation from GPIO number to hardware pin number to
irq_reqres/relres hooks to avoid failure when IRQs are requested. The
actual failure happened inside gpiochip_lock_as_irq() because it calls
gpiod_get_direction() and pinctrl-intel.c::intel_gpio_get_direction()
implementation originally missed the translation so the two hooks made
it work by skipping the ->get_direction() call entirely (it overwrote
the default GPIOLIB provided functions).

The proper fix that adds translation to GPIO callbacks was merged with
commit 011c3c5487e8 ("pinctrl: intel: Do pin translation in other GPIO
operations as well"). This allows us to use the default GPIOLIB provided
functions again.

In addition as find out by Benjamin Tissoires the two functions
(intel_gpio_irq_reqres()/intel_gpio_irq_relres()) now cause problems of
their own because they operate on pin numbers and pass that pin number
to gpiochip_lock_as_irq() which actually expects a GPIO number.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=199911
Fixes: a6f3670b0159 ("pinctrl: intel: Do pin translation when lock IRQ")
Reported-and-tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/intel/pinctrl-intel.c