diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2018-03-27 15:34:40 +0200 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2018-03-27 15:34:40 +0200 |
| commit | 89b0b4e2d3686dfc499c018922028791b954d7d9 (patch) | |
| tree | b6a5fd2a8e8957ab05071d88b8816de196d8f1b1 /include/linux | |
| parent | 6cb9215baeb9c1ed336a5e8905f7ad7c4698acc9 (diff) | |
| parent | 691bf5d5a7bfedc60b7218f4d9b915bf356df767 (diff) | |
Merge branch 'gpio-reserved-ranges' into devel
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/gpio/driver.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 1ba9a331ec51..5382b5183b7e 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -288,6 +288,21 @@ struct gpio_chip { struct gpio_irq_chip irq; #endif + /** + * @need_valid_mask: + * + * If set core allocates @valid_mask with all bits set to one. + */ + bool need_valid_mask; + + /** + * @valid_mask: + * + * If not %NULL holds bitmask of GPIOs which are valid to be used + * from the chip. + */ + unsigned long *valid_mask; + #if defined(CONFIG_OF_GPIO) /* * If CONFIG_OF is enabled, then all GPIO controllers described in the @@ -384,6 +399,7 @@ bool gpiochip_line_is_open_source(struct gpio_chip *chip, unsigned int offset); /* Sleep persistence inquiry for drivers */ bool gpiochip_line_is_persistent(struct gpio_chip *chip, unsigned int offset); +bool gpiochip_line_is_valid(const struct gpio_chip *chip, unsigned int offset); /* get driver data */ void *gpiochip_get_data(struct gpio_chip *chip); |
