diff options
| author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2025-12-31 09:32:14 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-01-08 10:15:00 +0100 |
| commit | 134d014bc64fba75885586294c832397a10c9785 (patch) | |
| tree | 49cb8ed25bd9517590d9f701ae3f4303de52acbf /drivers | |
| parent | 7d76825dcd8a82fc6f0ae5447217e3931af7b847 (diff) | |
| download | linux-134d014bc64fba75885586294c832397a10c9785.tar.gz linux-134d014bc64fba75885586294c832397a10c9785.tar.bz2 linux-134d014bc64fba75885586294c832397a10c9785.zip | |
gpiolib: acpi: Add acpi_gpio_need_run_edge_events_on_boot() getter
[ Upstream commit 5666a8777add09d1167de308df2147983486a0af ]
Add acpi_gpio_need_run_edge_events_on_boot() getter which moves
towards isolating the GPIO ACPI and quirk APIs. It will helps
splitting them completely in the next changes.
No functional changes.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Stable-dep-of: 2d967310c49e ("gpiolib: acpi: Add quirk for Dell Precision 7780")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 7 | ||||
| -rw-r--r-- | drivers/gpio/gpiolib-acpi.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 7f2f3a686bf1..f64f28423fea 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -268,7 +268,7 @@ static void acpi_gpiochip_request_irq(struct acpi_gpio_chip *acpi_gpio, event->irq_requested = true; /* Make sure we trigger the initial state of edge-triggered IRQs */ - if (run_edge_events_on_boot && + if (acpi_gpio_need_run_edge_events_on_boot() && (event->irqflags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING))) { value = gpiod_get_raw_value_cansleep(event->desc); if (((event->irqflags & IRQF_TRIGGER_RISING) && value == 1) || @@ -371,6 +371,11 @@ void acpi_gpio_remove_from_deferred_list(struct list_head *list) mutex_unlock(&acpi_gpio_deferred_req_irqs_lock); } +int acpi_gpio_need_run_edge_events_on_boot(void) +{ + return run_edge_events_on_boot; +} + bool acpi_gpio_in_ignore_list(enum acpi_gpio_ignore_list list, const char *controller_in, unsigned int pin_in) { diff --git a/drivers/gpio/gpiolib-acpi.h b/drivers/gpio/gpiolib-acpi.h index 8249977e6140..a90267470a4e 100644 --- a/drivers/gpio/gpiolib-acpi.h +++ b/drivers/gpio/gpiolib-acpi.h @@ -63,6 +63,8 @@ void acpi_gpio_process_deferred_list(struct list_head *list); bool acpi_gpio_add_to_deferred_list(struct list_head *list); void acpi_gpio_remove_from_deferred_list(struct list_head *list); +int acpi_gpio_need_run_edge_events_on_boot(void); + enum acpi_gpio_ignore_list { ACPI_GPIO_IGNORE_WAKE, ACPI_GPIO_IGNORE_INTERRUPT, |
