aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/gpio-config.c
diff options
context:
space:
mode:
authorDaein Moon <moon9124@samsung.com>2010-10-25 19:40:08 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-10-25 19:40:08 -0400
commita6149c09c96d2afdc73ff77f58d14f1e8946b1c6 (patch)
treea2c63daf2ea9925f422910ee0503cd92023e0555 /arch/arm/plat-samsung/gpio-config.c
parentd07dc60c6caf94dcf42e53f4db105de970abf4db (diff)
ARM: SAMSUNG: Add the missed s3c_gpio_getpull() API
This patch adds the s3c_gpio_getpull() API that has been missed in the plat-samsung/gpio-config.c and actullay there is its extern declaration in plat/gpio-cfg.h. Signed-off-by: Daein Moon <moon9124@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung/gpio-config.c')
-rw-r--r--arch/arm/plat-samsung/gpio-config.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/gpio-config.c b/arch/arm/plat-samsung/gpio-config.c
index 8a372110a850..b732b773b9af 100644
--- a/arch/arm/plat-samsung/gpio-config.c
+++ b/arch/arm/plat-samsung/gpio-config.c
@@ -111,6 +111,25 @@ int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull)
111} 111}
112EXPORT_SYMBOL(s3c_gpio_setpull); 112EXPORT_SYMBOL(s3c_gpio_setpull);
113 113
114s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin)
115{
116 struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin);
117 unsigned long flags;
118 int offset;
119 u32 pup = 0;
120
121 if (chip) {
122 offset = pin - chip->chip.base;
123
124 s3c_gpio_lock(chip, flags);
125 pup = s3c_gpio_do_getpull(chip, offset);
126 s3c_gpio_unlock(chip, flags);
127 }
128
129 return (__force s3c_gpio_pull_t)pup;
130}
131EXPORT_SYMBOL(s3c_gpio_getpull);
132
114#ifdef CONFIG_S3C_GPIO_CFG_S3C24XX 133#ifdef CONFIG_S3C_GPIO_CFG_S3C24XX
115int s3c_gpio_setcfg_s3c24xx_a(struct s3c_gpio_chip *chip, 134int s3c_gpio_setcfg_s3c24xx_a(struct s3c_gpio_chip *chip,
116 unsigned int off, unsigned int cfg) 135 unsigned int off, unsigned int cfg)