diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-04-17 13:37:28 +0300 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-04-18 13:01:55 +0300 |
commit | 1736df17fea09059f6834da203bcd35fdf35bdf6 (patch) | |
tree | 3049353a9441bf8575c998a80149bce230f9c7fc | |
parent | 716b532814ffd94792f9033c3ece79145d92d701 (diff) |
gpiolib: acpi: Set label for IRQ only lines
When line locked as IRQ it has no label assigned. Assign
the meaningful value to it.
Ex. (for the PCA9355 and MAX3111e chips connected to the system):
=== Before ===
PCA953x: interrupt
MAX3111e: interrupt
=== After ===
PCA953x: NIO1 GpioInt(0)
MAX3111e: URT0 GpioInt(0)
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 0b0c8729fc6e..553a5f94c00a 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -1066,6 +1066,10 @@ int acpi_dev_gpio_irq_wake_get_by(struct acpi_device *adev, const char *con_id, acpi_gpio_update_gpiod_lookup_flags(&lflags, &info); snprintf(label, sizeof(label), "%pfwP GpioInt(%d)", fwnode, index); + ret = gpiod_set_consumer_name(desc, con_id ?: label); + if (ret) + return ret; + ret = gpiod_configure_flags(desc, label, lflags, dflags); if (ret < 0) return ret; |