diff options
Diffstat (limited to 'include/linux/gpio')
-rw-r--r-- | include/linux/gpio/consumer.h | 25 | ||||
-rw-r--r-- | include/linux/gpio/driver.h | 3 | ||||
-rw-r--r-- | include/linux/gpio/machine.h | 4 |
3 files changed, 30 insertions, 2 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index 7447d85dbe2f..dbd065963296 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h | |||
@@ -139,6 +139,7 @@ void gpiod_set_raw_array_value_cansleep(unsigned int array_size, | |||
139 | int *value_array); | 139 | int *value_array); |
140 | 140 | ||
141 | int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce); | 141 | int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce); |
142 | int gpiod_set_transitory(struct gpio_desc *desc, bool transitory); | ||
142 | 143 | ||
143 | int gpiod_is_active_low(const struct gpio_desc *desc); | 144 | int gpiod_is_active_low(const struct gpio_desc *desc); |
144 | int gpiod_cansleep(const struct gpio_desc *desc); | 145 | int gpiod_cansleep(const struct gpio_desc *desc); |
@@ -150,8 +151,14 @@ struct gpio_desc *gpio_to_desc(unsigned gpio); | |||
150 | int desc_to_gpio(const struct gpio_desc *desc); | 151 | int desc_to_gpio(const struct gpio_desc *desc); |
151 | 152 | ||
152 | /* Child properties interface */ | 153 | /* Child properties interface */ |
154 | struct device_node; | ||
153 | struct fwnode_handle; | 155 | struct fwnode_handle; |
154 | 156 | ||
157 | struct gpio_desc *devm_gpiod_get_from_of_node(struct device *dev, | ||
158 | struct device_node *node, | ||
159 | const char *propname, int index, | ||
160 | enum gpiod_flags dflags, | ||
161 | const char *label); | ||
155 | struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode, | 162 | struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode, |
156 | const char *propname, int index, | 163 | const char *propname, int index, |
157 | enum gpiod_flags dflags, | 164 | enum gpiod_flags dflags, |
@@ -431,6 +438,13 @@ static inline int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce) | |||
431 | return -ENOSYS; | 438 | return -ENOSYS; |
432 | } | 439 | } |
433 | 440 | ||
441 | static inline int gpiod_set_transitory(struct gpio_desc *desc, bool transitory) | ||
442 | { | ||
443 | /* GPIO can never have been requested */ | ||
444 | WARN_ON(1); | ||
445 | return -ENOSYS; | ||
446 | } | ||
447 | |||
434 | static inline int gpiod_is_active_low(const struct gpio_desc *desc) | 448 | static inline int gpiod_is_active_low(const struct gpio_desc *desc) |
435 | { | 449 | { |
436 | /* GPIO can never have been requested */ | 450 | /* GPIO can never have been requested */ |
@@ -464,9 +478,20 @@ static inline int desc_to_gpio(const struct gpio_desc *desc) | |||
464 | } | 478 | } |
465 | 479 | ||
466 | /* Child properties interface */ | 480 | /* Child properties interface */ |
481 | struct device_node; | ||
467 | struct fwnode_handle; | 482 | struct fwnode_handle; |
468 | 483 | ||
469 | static inline | 484 | static inline |
485 | struct gpio_desc *devm_gpiod_get_from_of_node(struct device *dev, | ||
486 | struct device_node *node, | ||
487 | const char *propname, int index, | ||
488 | enum gpiod_flags dflags, | ||
489 | const char *label) | ||
490 | { | ||
491 | return ERR_PTR(-ENOSYS); | ||
492 | } | ||
493 | |||
494 | static inline | ||
470 | struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode, | 495 | struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode, |
471 | const char *propname, int index, | 496 | const char *propname, int index, |
472 | enum gpiod_flags dflags, | 497 | enum gpiod_flags dflags, |
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 7258cd676df4..1ba9a331ec51 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h | |||
@@ -436,6 +436,9 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip, | |||
436 | struct lock_class_key *lock_key, | 436 | struct lock_class_key *lock_key, |
437 | struct lock_class_key *request_key); | 437 | struct lock_class_key *request_key); |
438 | 438 | ||
439 | bool gpiochip_irqchip_irq_valid(const struct gpio_chip *gpiochip, | ||
440 | unsigned int offset); | ||
441 | |||
439 | #ifdef CONFIG_LOCKDEP | 442 | #ifdef CONFIG_LOCKDEP |
440 | 443 | ||
441 | /* | 444 | /* |
diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h index 846be7c69a52..b2f2dc638463 100644 --- a/include/linux/gpio/machine.h +++ b/include/linux/gpio/machine.h | |||
@@ -10,8 +10,8 @@ enum gpio_lookup_flags { | |||
10 | GPIO_ACTIVE_LOW = (1 << 0), | 10 | GPIO_ACTIVE_LOW = (1 << 0), |
11 | GPIO_OPEN_DRAIN = (1 << 1), | 11 | GPIO_OPEN_DRAIN = (1 << 1), |
12 | GPIO_OPEN_SOURCE = (1 << 2), | 12 | GPIO_OPEN_SOURCE = (1 << 2), |
13 | GPIO_SLEEP_MAINTAIN_VALUE = (0 << 3), | 13 | GPIO_PERSISTENT = (0 << 3), |
14 | GPIO_SLEEP_MAY_LOSE_VALUE = (1 << 3), | 14 | GPIO_TRANSITORY = (1 << 3), |
15 | }; | 15 | }; |
16 | 16 | ||
17 | /** | 17 | /** |