mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 22:12:16 +00:00
gpio: acpi: Split out acpi_gpio_get_irq_resource() helper
The helper does retrieve pointer to struct acpi_resource_gpio from struct acpi_resource if it represents GpioInt() resource. It will be used by PNP code later on. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
a31f5c3a68
commit
25e3ef894e
2 changed files with 25 additions and 5 deletions
|
@ -964,6 +964,8 @@ int devm_acpi_dev_add_driver_gpios(struct device *dev,
|
|||
const struct acpi_gpio_mapping *gpios);
|
||||
void devm_acpi_dev_remove_driver_gpios(struct device *dev);
|
||||
|
||||
bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
|
||||
struct acpi_resource_gpio **agpio);
|
||||
int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index);
|
||||
#else
|
||||
static inline int acpi_dev_add_driver_gpios(struct acpi_device *adev,
|
||||
|
@ -980,6 +982,11 @@ static inline int devm_acpi_dev_add_driver_gpios(struct device *dev,
|
|||
}
|
||||
static inline void devm_acpi_dev_remove_driver_gpios(struct device *dev) {}
|
||||
|
||||
static inline bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
|
||||
struct acpi_resource_gpio **agpio)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index)
|
||||
{
|
||||
return -ENXIO;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue