mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
31ba56f274
commit
f447ed8b31
2 changed files with 9 additions and 5 deletions
|
|
@ -2681,11 +2681,14 @@ static int exynos_gpio_xlate(struct gpio_chip *gc,
|
|||
|
||||
if (s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(gpiospec->args[1])))
|
||||
pr_warn("gpio_xlate: failed to set pin function\n");
|
||||
if (s3c_gpio_setpull(pin, gpiospec->args[2]))
|
||||
if (s3c_gpio_setpull(pin, gpiospec->args[2] & 0xffff))
|
||||
pr_warn("gpio_xlate: failed to set pin pull up/down\n");
|
||||
if (s5p_gpio_set_drvstr(pin, gpiospec->args[3]))
|
||||
pr_warn("gpio_xlate: failed to set pin drive strength\n");
|
||||
|
||||
if (flags)
|
||||
*flags = gpiospec->args[2] >> 16;
|
||||
|
||||
return gpiospec->args[0];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue