summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2020-07-20 16:00:43 +0200
committerLinus Walleij <linus.walleij@linaro.org>2020-07-20 16:00:43 +0200
commit3762442af6ad914b537f444f3d4672af7685ab2e (patch)
tree51f9431cdb220bf5dbd1d4d30a548737520a3b0f /drivers
parentc4429556646edd7f557e1b6451e0b14b832634d3 (diff)
Revert "gpio: omap: handle pin config bias flags"
This reverts commit 40e30d26d909af89de2dcd0b4abdd27c47ac2235. I applied the patch to the wrong tree, oooups. Also there is a new version of it. Revert it out of pinctrl and apply to the gpio tree. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/gpio-omap.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index eba303cff7cb..b8e2ecc3eade 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -896,21 +896,12 @@ static int omap_gpio_set_config(struct gpio_chip *chip, unsigned offset,
unsigned long config)
{
u32 debounce;
- int ret = -ENOTSUPP;
- 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))
- {
- ret = gpiochip_generic_config(chip, offset, config);
- }
- else if (pinconf_to_config_param(config) == PIN_CONFIG_INPUT_DEBOUNCE)
- {
- debounce = pinconf_to_config_argument(config);
- ret = omap_gpio_debounce(chip, offset, debounce);
- }
+ if (pinconf_to_config_param(config) != PIN_CONFIG_INPUT_DEBOUNCE)
+ return -ENOTSUPP;
- return ret;
+ debounce = pinconf_to_config_argument(config);
+ return omap_gpio_debounce(chip, offset, debounce);
}
static void omap_gpio_set(struct gpio_chip *chip, unsigned offset, int value)