]> 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)
commit5d65a1a28c6f6e97cae938d76825c40848649a8d
treea1dbfaad88799c6874553940e2569e5d22417e48
parentb2e0716c9fa49337bf4dc6870b6ec3ed84e04458
gpiolib: acpi: Switch to cansleep version of GPIO library call

The commit bc44e9a88f0a

  ("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: bc44e9a88f0a ("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