aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-exynos4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-exynos4.c')
-rw-r--r--drivers/gpio/gpio-exynos4.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-exynos4.c b/drivers/gpio/gpio-exynos4.c
index d54ca6adb660..9029835112e7 100644
--- a/drivers/gpio/gpio-exynos4.c
+++ b/drivers/gpio/gpio-exynos4.c
@@ -21,16 +21,37 @@
21#include <plat/gpio-cfg.h> 21#include <plat/gpio-cfg.h>
22#include <plat/gpio-cfg-helpers.h> 22#include <plat/gpio-cfg-helpers.h>
23 23
24int s3c_gpio_setpull_exynos4(struct s3c_gpio_chip *chip,
25 unsigned int off, s3c_gpio_pull_t pull)
26{
27 if (pull == S3C_GPIO_PULL_UP)
28 pull = 3;
29
30 return s3c_gpio_setpull_updown(chip, off, pull);
31}
32
33s3c_gpio_pull_t s3c_gpio_getpull_exynos4(struct s3c_gpio_chip *chip,
34 unsigned int off)
35{
36 s3c_gpio_pull_t pull;
37
38 pull = s3c_gpio_getpull_updown(chip, off);
39 if (pull == 3)
40 pull = S3C_GPIO_PULL_UP;
41
42 return pull;
43}
44
24static struct s3c_gpio_cfg gpio_cfg = { 45static struct s3c_gpio_cfg gpio_cfg = {
25 .set_config = s3c_gpio_setcfg_s3c64xx_4bit, 46 .set_config = s3c_gpio_setcfg_s3c64xx_4bit,
26 .set_pull = s3c_gpio_setpull_updown, 47 .set_pull = s3c_gpio_setpull_exynos4,
27 .get_pull = s3c_gpio_getpull_updown, 48 .get_pull = s3c_gpio_getpull_exynos4,
28}; 49};
29 50
30static struct s3c_gpio_cfg gpio_cfg_noint = { 51static struct s3c_gpio_cfg gpio_cfg_noint = {
31 .set_config = s3c_gpio_setcfg_s3c64xx_4bit, 52 .set_config = s3c_gpio_setcfg_s3c64xx_4bit,
32 .set_pull = s3c_gpio_setpull_updown, 53 .set_pull = s3c_gpio_setpull_exynos4,
33 .get_pull = s3c_gpio_getpull_updown, 54 .get_pull = s3c_gpio_getpull_exynos4,
34}; 55};
35 56
36/* 57/*