diff options
author | Hans de Goede <hdegoede@redhat.com> | 2019-11-14 11:25:59 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-11-15 13:47:10 +0100 |
commit | 3f86a7e090d1dfb974a9dc9d44049f9bff01e6a5 (patch) | |
tree | 8a71dd9d147bcee19a3bac8f2b172821ca2cd661 | |
parent | b27f300f8cbd11b9298820910df9a7258af2f726 (diff) | |
download | linux-3f86a7e090d1dfb974a9dc9d44049f9bff01e6a5.tar.bz2 |
gpiolib: acpi: Print pin number on acpi_gpiochip_alloc_event errors
Print pin number and error-code on acpi_gpiochip_alloc_event errors,
to help debugging these.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20191114102600.34558-1-hdegoede@redhat.com
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 609ed16ae933..7b02ee2de0a0 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -230,19 +230,25 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares, desc = gpiochip_request_own_desc(chip, pin, "ACPI:Event", GPIO_ACTIVE_HIGH, GPIOD_IN); if (IS_ERR(desc)) { - dev_err(chip->parent, "Failed to request GPIO\n"); + dev_err(chip->parent, + "Failed to request GPIO for pin 0x%04X, err %ld\n", + pin, PTR_ERR(desc)); return AE_ERROR; } ret = gpiochip_lock_as_irq(chip, pin); if (ret) { - dev_err(chip->parent, "Failed to lock GPIO as interrupt\n"); + dev_err(chip->parent, + "Failed to lock GPIO pin 0x%04X as interrupt, err %d\n", + pin, ret); goto fail_free_desc; } irq = gpiod_to_irq(desc); if (irq < 0) { - dev_err(chip->parent, "Failed to translate GPIO to IRQ\n"); + dev_err(chip->parent, + "Failed to translate GPIO pin 0x%04X to IRQ, err %d\n", + pin, irq); goto fail_unlock_irq; } |