diff options
-rw-r--r-- | Documentation/devicetree/bindings/gpio/gpio-samsung.txt | 9 | ||||
-rw-r--r-- | drivers/gpio/gpio-samsung.c | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt index 8f50fe5e6c42..5375625e8cd2 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt | |||
@@ -11,14 +11,15 @@ Required properties: | |||
11 | <[phandle of the gpio controller node] | 11 | <[phandle of the gpio controller node] |
12 | [pin number within the gpio controller] | 12 | [pin number within the gpio controller] |
13 | [mux function] | 13 | [mux function] |
14 | [pull up/down] | 14 | [flags and pull up/down] |
15 | [drive strength]> | 15 | [drive strength]> |
16 | 16 | ||
17 | Values for gpio specifier: | 17 | Values for gpio specifier: |
18 | - Pin number: is a value between 0 to 7. | 18 | - Pin number: is a value between 0 to 7. |
19 | - Pull Up/Down: 0 - Pull Up/Down Disabled. | 19 | - Flags and Pull Up/Down: 0 - Pull Up/Down Disabled. |
20 | 1 - Pull Down Enabled. | 20 | 1 - Pull Down Enabled. |
21 | 3 - Pull Up Enabled. | 21 | 3 - Pull Up Enabled. |
22 | Bit 16 (0x00010000) - Input is active low. | ||
22 | - Drive Strength: 0 - 1x, | 23 | - Drive Strength: 0 - 1x, |
23 | 1 - 3x, | 24 | 1 - 3x, |
24 | 2 - 2x, | 25 | 2 - 2x, |
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 | ||