1 /* SPDX-License-Identifier: GPL-2.0 */
3 * ACPI helpers for GPIO API
5 * Copyright (C) 2012,2019 Intel Corporation
11 #include <linux/err.h>
12 #include <linux/types.h>
14 #include <linux/gpio/consumer.h>
24 void acpi_gpiochip_add(struct gpio_chip *chip);
25 void acpi_gpiochip_remove(struct gpio_chip *chip);
27 void acpi_gpiochip_request_interrupts(struct gpio_chip *chip);
28 void acpi_gpiochip_free_interrupts(struct gpio_chip *chip);
30 struct gpio_desc *acpi_find_gpio(struct fwnode_handle *fwnode,
33 enum gpiod_flags *dflags,
34 unsigned long *lookupflags);
36 int acpi_gpio_count(struct device *dev, const char *con_id);
38 static inline void acpi_gpiochip_add(struct gpio_chip *chip) { }
39 static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { }
42 acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { }
45 acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { }
47 static inline struct gpio_desc *
48 acpi_find_gpio(struct fwnode_handle *fwnode, const char *con_id,
49 unsigned int idx, enum gpiod_flags *dflags,
50 unsigned long *lookupflags)
52 return ERR_PTR(-ENOENT);
54 static inline int acpi_gpio_count(struct device *dev, const char *con_id)
60 #endif /* GPIOLIB_ACPI_H */