aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gpio/consumer.h
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2018-08-28 12:58:03 -0400
committerTony Lindgren <tony@atomide.com>2018-08-28 12:58:03 -0400
commitea4d65f14f6aaa53e379b93c5544245ef081b3e7 (patch)
treea15485f4f1cf547a52b31fa8e16e14b9579b7200 /include/linux/gpio/consumer.h
parentce32d59ee2cd036f6e8a6ed17a06a0b0bec5c67c (diff)
parent496f3347d834aec91c38b45d6249ed00f58ad233 (diff)
Merge branch 'perm-fix' into omap-for-v4.19/fixes-v2
Diffstat (limited to 'include/linux/gpio/consumer.h')
-rw-r--r--include/linux/gpio/consumer.h14
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);
145int gpiod_cansleep(const struct gpio_desc *desc); 142int gpiod_cansleep(const struct gpio_desc *desc);
146 143
147int gpiod_to_irq(const struct gpio_desc *desc); 144int gpiod_to_irq(const struct gpio_desc *desc);
145void 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 */
150struct gpio_desc *gpio_to_desc(unsigned gpio); 148struct 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
468static 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
470static inline struct gpio_desc *gpio_to_desc(unsigned gpio) 474static inline struct gpio_desc *gpio_to_desc(unsigned gpio)
471{ 475{
472 return ERR_PTR(-EINVAL); 476 return ERR_PTR(-EINVAL);