diff options
author | Olof Johansson <olof@lixom.net> | 2012-06-26 00:18:21 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-07-17 15:00:15 -0400 |
commit | f447ed8b31da7b24c7c75c2d4624598135b41217 (patch) | |
tree | 37888d2e359422bf4900850722d8809eb77f62c1 /drivers/gpio/gpio-samsung.c | |
parent | 31ba56f274d60d0b84efae4d15a9cd3e0486fa8c (diff) |
gpio: samsung: add flags specifier to device-tree binding
This adds a flags field to the gpio specifier for Samsung. I didn't
want to add yet another field in the already quite long specifier, so
I decided to compress it together with the Pull Up/Down settings instead.
This is needed to, for example, have a gpio-keys input that is active low.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-samsung.c')
-rw-r--r-- | drivers/gpio/gpio-samsung.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index b6453d0e44ad..92f7b2bb79d4 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c | |||
@@ -2681,11 +2681,14 @@ static int exynos_gpio_xlate(struct gpio_chip *gc, | |||
2681 | 2681 | ||
2682 | if (s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(gpiospec->args[1]))) | 2682 | if (s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(gpiospec->args[1]))) |
2683 | pr_warn("gpio_xlate: failed to set pin function\n"); | 2683 | pr_warn("gpio_xlate: failed to set pin function\n"); |
2684 | if (s3c_gpio_setpull(pin, gpiospec->args[2])) | 2684 | if (s3c_gpio_setpull(pin, gpiospec->args[2] & 0xffff)) |
2685 | pr_warn("gpio_xlate: failed to set pin pull up/down\n"); | 2685 | pr_warn("gpio_xlate: failed to set pin pull up/down\n"); |
2686 | if (s5p_gpio_set_drvstr(pin, gpiospec->args[3])) | 2686 | if (s5p_gpio_set_drvstr(pin, gpiospec->args[3])) |
2687 | pr_warn("gpio_xlate: failed to set pin drive strength\n"); | 2687 | pr_warn("gpio_xlate: failed to set pin drive strength\n"); |
2688 | 2688 | ||
2689 | if (flags) | ||
2690 | *flags = gpiospec->args[2] >> 16; | ||
2691 | |||
2689 | return gpiospec->args[0]; | 2692 | return gpiospec->args[0]; |
2690 | } | 2693 | } |
2691 | 2694 | ||