diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-06-19 09:10:20 +0200 |
|---|---|---|
| committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-06-19 09:10:20 +0200 |
| commit | 0a005148817cedf8181a0a1699d399d47358596a (patch) | |
| tree | 4650881bf4cbe1cf6e73b37013858cbd2e8c49f1 /drivers/gpio/gpio-mmio.c | |
| parent | 7b20980ffc11514d8849811857d915001236bcfa (diff) | |
| parent | deefc7083414de81aad102b60f0390f600d7eb79 (diff) | |
Merge tag 'gpio-mmio-bgpiof-no-input-flag-for-v6.17' into gpio/for-next
Immutable tag for the pinctrl tree to pull from
Add the BGPIOF_NO_INPUT to the gpio-mmio API.
Diffstat (limited to 'drivers/gpio/gpio-mmio.c')
| -rw-r--r-- | drivers/gpio/gpio-mmio.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c index 9169eccadb23..4d999f358cc4 100644 --- a/drivers/gpio/gpio-mmio.c +++ b/drivers/gpio/gpio-mmio.c @@ -348,6 +348,11 @@ static int bgpio_dir_return(struct gpio_chip *gc, unsigned int gpio, bool dir_ou return pinctrl_gpio_direction_input(gc, gpio); } +static int bgpio_dir_in_err(struct gpio_chip *gc, unsigned int gpio) +{ + return -EINVAL; +} + static int bgpio_simple_dir_in(struct gpio_chip *gc, unsigned int gpio) { return bgpio_dir_return(gc, gpio, false); @@ -579,7 +584,11 @@ static int bgpio_setup_direction(struct gpio_chip *gc, gc->direction_output = bgpio_dir_out_err; else gc->direction_output = bgpio_simple_dir_out; - gc->direction_input = bgpio_simple_dir_in; + + if (flags & BGPIOF_NO_INPUT) + gc->direction_input = bgpio_dir_in_err; + else + gc->direction_input = bgpio_simple_dir_in; } return 0; |