]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: acpi: Switch to cansleep version of GPIO library call
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 13 Aug 2018 16:00:27 +0000 (19:00 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 29 Aug 2018 11:29:01 +0000 (13:29 +0200)
commit4f57f49fd48137a4616fe90f987abeebe37861e8
treea1dbfaad88799c6874553940e2569e5d22417e48
parent18f04a439d33c7d439e32f84e9083841ac5639f0
gpiolib: acpi: Switch to cansleep version of GPIO library call

The commit 4dc0506ef275

  ("gpiolib-acpi: make sure we trigger edge events at least once on boot")

added a initial value check for pin which is about to be locked as IRQ.
Unfortunately, not all GPIO drivers can do that atomically. Thus,
switch to cansleep version of the call. Otherwise we have a warning:

...
  WARNING: CPU: 2 PID: 1408 at drivers/gpio/gpiolib.c:2883 gpiod_get_value+0x46/0x50
...
  RIP: 0010:gpiod_get_value+0x46/0x50
...

The change tested on Intel Broxton with Whiskey Cove PMIC GPIO controller.

Fixes: 4dc0506ef275 ("gpiolib-acpi: make sure we trigger edge events at least once on boot")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-acpi.c