summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-tegra.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2017-01-26 15:28:02 +0100
committerLinus Walleij <linus.walleij@linaro.org>2017-01-26 15:28:02 +0100
commit283a981387c498f846e89450bd83b2c349223b4f (patch)
tree5513aa9484e354f8ab1a5cbd6cac5b1fd3cfd4e6 /drivers/gpio/gpio-tegra.c
parent6596e59e63cd4c0c0b787ce8c1e8bdd1d957b16e (diff)
parent2956b5d94a76b596fa5057c2b3ca915cb27d7652 (diff)
downloadlwn-283a981387c498f846e89450bd83b2c349223b4f.tar.gz
lwn-283a981387c498f846e89450bd83b2c349223b4f.zip
Merge branch 'ib-pinctrl-genprops' of /home/linus/linux-pinctrl into devel
Diffstat (limited to 'drivers/gpio/gpio-tegra.c')
-rw-r--r--drivers/gpio/gpio-tegra.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 661b0e34e067..88529d3c06c9 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -238,6 +238,18 @@ static int tegra_gpio_set_debounce(struct gpio_chip *chip, unsigned int offset,
return 0;
}
+static int tegra_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
+ unsigned long config)
+{
+ u32 debounce;
+
+ if (pinconf_to_config_param(config) != PIN_CONFIG_INPUT_DEBOUNCE)
+ return -ENOTSUPP;
+
+ debounce = pinconf_to_config_argument(config);
+ return tegra_gpio_set_debounce(chip, offset, debounce);
+}
+
static int tegra_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
{
struct tegra_gpio_info *tgi = gpiochip_get_data(chip);
@@ -615,7 +627,7 @@ static int tegra_gpio_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, tgi);
if (config->debounce_supported)
- tgi->gc.set_debounce = tegra_gpio_set_debounce;
+ tgi->gc.set_config = tegra_gpio_set_config;
tgi->bank_info = devm_kzalloc(&pdev->dev, tgi->bank_count *
sizeof(*tgi->bank_info), GFP_KERNEL);