From 05beac1c1ba503d83308bb77f4190077bbe41f7b Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Wed, 8 Jun 2011 09:12:16 -0600 Subject: [PATCH] --- yaml --- r: 253259 b: refs/heads/master c: c226feb013ce81a18512fb4827bf7c2352d8b470 h: refs/heads/master i: 253257: 25ee18bce50b047c1aeba44f7e2f9b21bc85a865 253255: 8e1938ea8a779e0416c4bf30f3fc0d192985dc13 v: v3 --- [refs] | 2 +- trunk/drivers/gpio/Kconfig | 28 ++++++++-------------------- trunk/drivers/gpio/gpio-exynos4.c | 29 +++++++++++++++++++++++++---- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/[refs] b/[refs] index ae312e82df23..5b38f67d2004 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 85ec7b970553369e0c956fab1d7a6022f2a99369 +refs/heads/master: c226feb013ce81a18512fb4827bf7c2352d8b470 diff --git a/trunk/drivers/gpio/Kconfig b/trunk/drivers/gpio/Kconfig index 4a7f63143455..2967002a9f82 100644 --- a/trunk/drivers/gpio/Kconfig +++ b/trunk/drivers/gpio/Kconfig @@ -87,32 +87,20 @@ config GPIO_IT8761E Say yes here to support GPIO functionality of IT8761E super I/O chip. config GPIO_EXYNOS4 - bool "Samsung Exynos4 GPIO library support" - default y if CPU_EXYNOS4210 - depends on ARM - help - Say yes here to support Samsung Exynos4 series SoCs GPIO library + def_bool y + depends on CPU_EXYNOS4210 config GPIO_PLAT_SAMSUNG - bool "Samsung SoCs GPIO library support" - default y if SAMSUNG_GPIOLIB_4BIT - depends on ARM - help - Say yes here to support Samsung SoCs GPIO library + def_bool y + depends on SAMSUNG_GPIOLIB_4BIT config GPIO_S5PC100 - bool "Samsung S5PC100 GPIO library support" - default y if CPU_S5PC100 - depends on ARM - help - Say yes here to support Samsung S5PC100 SoCs GPIO library + def_bool y + depends on CPU_S5PC100 config GPIO_S5PV210 - bool "Samsung S5PV210/S5PC110 GPIO library support" - default y if CPU_S5PV210 - depends on ARM - help - Say yes here to support Samsung S5PV210/S5PC110 SoCs GPIO library + def_bool y + depends on CPU_S5PV210 config GPIO_PL061 bool "PrimeCell PL061 GPIO support" diff --git a/trunk/drivers/gpio/gpio-exynos4.c b/trunk/drivers/gpio/gpio-exynos4.c index d54ca6adb660..9029835112e7 100644 --- a/trunk/drivers/gpio/gpio-exynos4.c +++ b/trunk/drivers/gpio/gpio-exynos4.c @@ -21,16 +21,37 @@ #include #include +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, }; /*