summaryrefslogtreecommitdiff
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
authorDaniel Scally <djrscally@gmail.com>2021-06-03 23:40:05 +0100
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-06-04 16:24:19 +0300
commit043d7f09bf614809c10c4acbf0695ef731958300 (patch)
tree8a62dceefab5f54426f90f838c7eb91a04294322 /include/linux/acpi.h
parent43582f29b161d820717bc13f562bca27af12e3cf (diff)
gpiolib: acpi: Add acpi_gpio_get_io_resource()
Add a function to verify that a given ACPI resource represents a GpioIo() type of resource, and return it if so. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Daniel Scally <djrscally@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r--include/linux/acpi.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index c60745f657e9..a74d37a3b618 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -1096,6 +1096,8 @@ void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const c
#if defined(CONFIG_ACPI) && defined(CONFIG_GPIOLIB)
bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
struct acpi_resource_gpio **agpio);
+bool acpi_gpio_get_io_resource(struct acpi_resource *ares,
+ struct acpi_resource_gpio **agpio);
int acpi_dev_gpio_irq_get_by(struct acpi_device *adev, const char *name, int index);
#else
static inline bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
@@ -1103,6 +1105,11 @@ static inline bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
{
return false;
}
+static inline bool acpi_gpio_get_io_resource(struct acpi_resource *ares,
+ struct acpi_resource_gpio **agpio)
+{
+ return false;
+}
static inline int acpi_dev_gpio_irq_get_by(struct acpi_device *adev,
const char *name, int index)
{