summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-11-11 13:47:20 +0200
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2021-02-15 11:43:31 +0100
commit1d10243dc295d2f49b73b1320a177491767f180d (patch)
tree17c204207659e872468dff31a272201a2250c0df /drivers/gpio
parentea6fe47f3ed4f89f9216e98f1344c06d6516cb28 (diff)
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 <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-merrifield.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-merrifield.c
index 706687fab634..22f3ce218f5d 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;