mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 10:02:33 -04:00
Merge tag 'gpio-mmio-bgpiof-no-input-flag-for-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel
Immutable tag for the pinctrl tree to pull from Add the BGPIOF_NO_INPUT to the gpio-mmio API. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
@@ -335,6 +335,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);
|
||||
@@ -566,7 +571,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;
|
||||
|
||||
@@ -750,6 +750,7 @@ int bgpio_init(struct gpio_chip *gc, struct device *dev,
|
||||
#define BGPIOF_NO_OUTPUT BIT(5) /* only input */
|
||||
#define BGPIOF_NO_SET_ON_INPUT BIT(6)
|
||||
#define BGPIOF_PINCTRL_BACKEND BIT(7) /* Call pinctrl direction setters */
|
||||
#define BGPIOF_NO_INPUT BIT(8) /* only output */
|
||||
|
||||
#ifdef CONFIG_GPIOLIB_IRQCHIP
|
||||
int gpiochip_irqchip_add_domain(struct gpio_chip *gc,
|
||||
|
||||
Reference in New Issue
Block a user