diff options
Diffstat (limited to 'include/linux/gpio/consumer.h')
| -rw-r--r-- | include/linux/gpio/consumer.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index 243112c7fa7d..21ddbe440030 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h | |||
| @@ -41,11 +41,8 @@ enum gpiod_flags { | |||
| 41 | GPIOD_OUT_LOW = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT, | 41 | GPIOD_OUT_LOW = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT, |
| 42 | GPIOD_OUT_HIGH = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT | | 42 | GPIOD_OUT_HIGH = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT | |
| 43 | GPIOD_FLAGS_BIT_DIR_VAL, | 43 | GPIOD_FLAGS_BIT_DIR_VAL, |
| 44 | GPIOD_OUT_LOW_OPEN_DRAIN = GPIOD_FLAGS_BIT_DIR_SET | | 44 | GPIOD_OUT_LOW_OPEN_DRAIN = GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_OPEN_DRAIN, |
| 45 | GPIOD_FLAGS_BIT_DIR_OUT | GPIOD_FLAGS_BIT_OPEN_DRAIN, | 45 | GPIOD_OUT_HIGH_OPEN_DRAIN = GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_OPEN_DRAIN, |
| 46 | GPIOD_OUT_HIGH_OPEN_DRAIN = GPIOD_FLAGS_BIT_DIR_SET | | ||
| 47 | GPIOD_FLAGS_BIT_DIR_OUT | GPIOD_FLAGS_BIT_DIR_VAL | | ||
| 48 | GPIOD_FLAGS_BIT_OPEN_DRAIN, | ||
| 49 | }; | 46 | }; |
| 50 | 47 | ||
| 51 | #ifdef CONFIG_GPIOLIB | 48 | #ifdef CONFIG_GPIOLIB |
| @@ -145,6 +142,7 @@ int gpiod_is_active_low(const struct gpio_desc *desc); | |||
| 145 | int gpiod_cansleep(const struct gpio_desc *desc); | 142 | int gpiod_cansleep(const struct gpio_desc *desc); |
| 146 | 143 | ||
| 147 | int gpiod_to_irq(const struct gpio_desc *desc); | 144 | int gpiod_to_irq(const struct gpio_desc *desc); |
| 145 | void gpiod_set_consumer_name(struct gpio_desc *desc, const char *name); | ||
| 148 | 146 | ||
| 149 | /* Convert between the old gpio_ and new gpiod_ interfaces */ | 147 | /* Convert between the old gpio_ and new gpiod_ interfaces */ |
| 150 | struct gpio_desc *gpio_to_desc(unsigned gpio); | 148 | struct gpio_desc *gpio_to_desc(unsigned gpio); |
| @@ -467,6 +465,12 @@ static inline int gpiod_to_irq(const struct gpio_desc *desc) | |||
| 467 | return -EINVAL; | 465 | return -EINVAL; |
| 468 | } | 466 | } |
| 469 | 467 | ||
| 468 | static inline void gpiod_set_consumer_name(struct gpio_desc *desc, const char *name) | ||
| 469 | { | ||
| 470 | /* GPIO can never have been requested */ | ||
| 471 | WARN_ON(1); | ||
| 472 | } | ||
| 473 | |||
| 470 | static inline struct gpio_desc *gpio_to_desc(unsigned gpio) | 474 | static inline struct gpio_desc *gpio_to_desc(unsigned gpio) |
| 471 | { | 475 | { |
| 472 | return ERR_PTR(-EINVAL); | 476 | return ERR_PTR(-EINVAL); |
