diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-06-15 14:57:39 -0600 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-06-15 14:57:39 -0600 |
commit | 2bc7c85210d75b7a8a7326284b4f608a16f52ffc (patch) | |
tree | ca306d89f64ceeee92531cc0a9ba5d246d09f044 /drivers/gpio/gpio-exynos4.c | |
parent | 12610be33df5563d3f8cb141f231d4dc5b2a317f (diff) | |
parent | df2212270ce94f12e9caed6ca04c7077672d588e (diff) |
Merge branch 'gpio/next-tegra' into gpio/next
Conflicts:
drivers/gpio/Kconfig
drivers/gpio/Makefile
Diffstat (limited to 'drivers/gpio/gpio-exynos4.c')
-rw-r--r-- | drivers/gpio/gpio-exynos4.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-exynos4.c b/drivers/gpio/gpio-exynos4.c index 6093a14037c..d24b337cf1a 100644 --- a/drivers/gpio/gpio-exynos4.c +++ b/drivers/gpio/gpio-exynos4.c @@ -20,16 +20,37 @@ #include <plat/gpio-cfg.h> #include <plat/gpio-cfg-helpers.h> +int s3c_gpio_setpull_exynos4(struct s3c_gpio_chip *chip, + unsigned int off, s3c_gpio_pull_t pull) +{ + if (pull == S3C_GPIO_PULL_UP) + pull = 3; + + return s3c_gpio_setpull_updown(chip, off, pull); +} + +s3c_gpio_pull_t s3c_gpio_getpull_exynos4(struct s3c_gpio_chip *chip, + unsigned int off) +{ + s3c_gpio_pull_t pull; + + pull = s3c_gpio_getpull_updown(chip, off); + if (pull == 3) + pull = S3C_GPIO_PULL_UP; + + return pull; +} + static struct s3c_gpio_cfg gpio_cfg = { .set_config = s3c_gpio_setcfg_s3c64xx_4bit, - .set_pull = s3c_gpio_setpull_updown, - .get_pull = s3c_gpio_getpull_updown, + .set_pull = s3c_gpio_setpull_exynos4, + .get_pull = s3c_gpio_getpull_exynos4, }; static struct s3c_gpio_cfg gpio_cfg_noint = { .set_config = s3c_gpio_setcfg_s3c64xx_4bit, - .set_pull = s3c_gpio_setpull_updown, - .get_pull = s3c_gpio_getpull_updown, + .set_pull = s3c_gpio_setpull_exynos4, + .get_pull = s3c_gpio_getpull_exynos4, }; /* |