From: Andy Shevchenko Date: Wed, 11 Nov 2020 11:47:20 +0000 (+0200) Subject: gpio: merrifield: Make bias configuration available for GPIOs X-Git-Tag: v5.12-rc1~105^2~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d10243dc295d2f49b73b1320a177491767f180d;p=thirdparty%2Fkernel%2Flinux.git gpio: merrifield: Make bias configuration available for GPIOs If we get bias set request, for example, from GpioIo() resource, we silently ignore it. Make bias configuration available for GPIOs. Signed-off-by: Andy Shevchenko --- diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-merrifield.c index 706687fab634e..22f3ce218f5d8 100644 --- a/drivers/gpio/gpio-merrifield.c +++ b/drivers/gpio/gpio-merrifield.c @@ -194,6 +194,11 @@ static int mrfld_gpio_set_config(struct gpio_chip *chip, unsigned int offset, { u32 debounce; + if ((pinconf_to_config_param(config) == PIN_CONFIG_BIAS_DISABLE) || + (pinconf_to_config_param(config) == PIN_CONFIG_BIAS_PULL_UP) || + (pinconf_to_config_param(config) == PIN_CONFIG_BIAS_PULL_DOWN)) + return gpiochip_generic_config(chip, offset, config); + if (pinconf_to_config_param(config) != PIN_CONFIG_INPUT_DEBOUNCE) return -ENOTSUPP;