linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: acpi: Skip _AEI entries without a handler rather then aborting the scan
@ 2017-06-23  7:26 Hans de Goede
  2017-06-26 16:08 ` Mika Westerberg
  2017-06-29 12:55 ` Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2017-06-23  7:26 UTC (permalink / raw)
  To: Mika Westerberg, Heikki Krogerus, Linus Walleij
  Cc: Hans de Goede, Andy Shevchenko, linux-gpio

acpi_walk_resources will stop as soon as the callback passed in returns
an error status. On a x86 tablet I have the first GpioInt in the _AEI
resource list has no handler defined in the DSDT, causing
acpi_walk_resources to abort scanning the rest of the resource list,
which does define valid ACPI GPIO events.

This commit changes the return for not finding a handler from
AE_BAD_PARAMETER to AE_OK so that the rest of the resource list will
get scanned normally in case of missing event handlers.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/gpio/gpiolib-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index 5b77248666fa..fd53e9ada7dd 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -201,7 +201,7 @@ static acpi_status acpi_gpiochip_request_interrupt(struct acpi_resource *ares,
 			handler = acpi_gpio_irq_handler_evt;
 	}
 	if (!handler)
-		return AE_BAD_PARAMETER;
+		return AE_OK;
 
 	pin = acpi_gpiochip_pin_to_gpio_offset(chip->gpiodev, pin);
 	if (pin < 0)
-- 
2.13.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-29 12:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-23  7:26 [PATCH] gpio: acpi: Skip _AEI entries without a handler rather then aborting the scan Hans de Goede
2017-06-26 16:08 ` Mika Westerberg
2017-06-27  9:12   ` Andy Shevchenko
2017-06-29 12:55 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).