diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/gpio/consumer.h | 8 | ||||
| -rw-r--r-- | include/linux/gpio/machine.h | 4 | ||||
| -rw-r--r-- | include/linux/of_gpio.h | 2 | ||||
| -rw-r--r-- | include/linux/pinctrl/pinconf-generic.h | 2 |
4 files changed, 13 insertions, 3 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index 7447d85dbe2f..540b2c142493 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); |
| @@ -431,6 +432,13 @@ static inline int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce) | |||
| 431 | return -ENOSYS; | 432 | return -ENOSYS; |
| 432 | } | 433 | } |
| 433 | 434 | ||
| 435 | static inline int gpiod_set_transitory(struct gpio_desc *desc, bool transitory) | ||
| 436 | { | ||
| 437 | /* GPIO can never have been requested */ | ||
| 438 | WARN_ON(1); | ||
| 439 | return -ENOSYS; | ||
| 440 | } | ||
| 441 | |||
| 434 | static inline int gpiod_is_active_low(const struct gpio_desc *desc) | 442 | static inline int gpiod_is_active_low(const struct gpio_desc *desc) |
| 435 | { | 443 | { |
| 436 | /* GPIO can never have been requested */ | 444 | /* GPIO can never have been requested */ |
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 | /** |
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h index 1fe205582111..18a7f03e1182 100644 --- a/include/linux/of_gpio.h +++ b/include/linux/of_gpio.h | |||
| @@ -31,7 +31,7 @@ enum of_gpio_flags { | |||
| 31 | OF_GPIO_ACTIVE_LOW = 0x1, | 31 | OF_GPIO_ACTIVE_LOW = 0x1, |
| 32 | OF_GPIO_SINGLE_ENDED = 0x2, | 32 | OF_GPIO_SINGLE_ENDED = 0x2, |
| 33 | OF_GPIO_OPEN_DRAIN = 0x4, | 33 | OF_GPIO_OPEN_DRAIN = 0x4, |
| 34 | OF_GPIO_SLEEP_MAY_LOSE_VALUE = 0x8, | 34 | OF_GPIO_TRANSITORY = 0x8, |
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | #ifdef CONFIG_OF_GPIO | 37 | #ifdef CONFIG_OF_GPIO |
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index ec6dadcc1fde..6c0680641108 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h | |||
| @@ -94,6 +94,7 @@ | |||
| 94 | * or latch delay (on outputs) this parameter (in a custom format) | 94 | * or latch delay (on outputs) this parameter (in a custom format) |
| 95 | * specifies the clock skew or latch delay. It typically controls how | 95 | * specifies the clock skew or latch delay. It typically controls how |
| 96 | * many double inverters are put in front of the line. | 96 | * many double inverters are put in front of the line. |
| 97 | * @PIN_CONFIG_PERSIST_STATE: retain pin state across sleep or controller reset | ||
| 97 | * @PIN_CONFIG_END: this is the last enumerator for pin configurations, if | 98 | * @PIN_CONFIG_END: this is the last enumerator for pin configurations, if |
| 98 | * you need to pass in custom configurations to the pin controller, use | 99 | * you need to pass in custom configurations to the pin controller, use |
| 99 | * PIN_CONFIG_END+1 as the base offset. | 100 | * PIN_CONFIG_END+1 as the base offset. |
| @@ -122,6 +123,7 @@ enum pin_config_param { | |||
| 122 | PIN_CONFIG_SLEEP_HARDWARE_STATE, | 123 | PIN_CONFIG_SLEEP_HARDWARE_STATE, |
| 123 | PIN_CONFIG_SLEW_RATE, | 124 | PIN_CONFIG_SLEW_RATE, |
| 124 | PIN_CONFIG_SKEW_DELAY, | 125 | PIN_CONFIG_SKEW_DELAY, |
| 126 | PIN_CONFIG_PERSIST_STATE, | ||
| 125 | PIN_CONFIG_END = 0x7F, | 127 | PIN_CONFIG_END = 0x7F, |
| 126 | PIN_CONFIG_MAX = 0xFF, | 128 | PIN_CONFIG_MAX = 0xFF, |
| 127 | }; | 129 | }; |
