aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/gpio-config.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-05-06 10:50:42 +0900
committerBen Dooks <ben-linux@fluff.org>2010-05-06 10:50:42 +0900
commit9933847b29bb3d3447d19236375ccc84bfbcf3df (patch)
treed8aa5a6cfc064cf668950c08f4a99418a104b950 /arch/arm/plat-samsung/gpio-config.c
parent97a339995fa6224487dc026e466f5bd1bbcaa3b2 (diff)
downloadkernel_samsung_tuna-9933847b29bb3d3447d19236375ccc84bfbcf3df.zip
kernel_samsung_tuna-9933847b29bb3d3447d19236375ccc84bfbcf3df.tar.gz
kernel_samsung_tuna-9933847b29bb3d3447d19236375ccc84bfbcf3df.tar.bz2
ARM: S3C24XX: Remove s3c2410_gpio_getcfg(), implement s3c_gpio_getcfg()
Add s3c_gpio_getcfg() and change anything using s3c2410_gpio_getcfg() to use this instead. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-samsung/gpio-config.c')
-rw-r--r--arch/arm/plat-samsung/gpio-config.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/gpio-config.c b/arch/arm/plat-samsung/gpio-config.c
index 19ab89d..3282db3 100644
--- a/arch/arm/plat-samsung/gpio-config.c
+++ b/arch/arm/plat-samsung/gpio-config.c
@@ -41,6 +41,26 @@ int s3c_gpio_cfgpin(unsigned int pin, unsigned int config)
}
EXPORT_SYMBOL(s3c_gpio_cfgpin);
+unsigned s3c_gpio_getcfg(unsigned int pin)
+{
+ struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin);
+ unsigned long flags;
+ unsigned ret = 0;
+ int offset;
+
+ if (chip) {
+ offset = pin - chip->chip.base;
+
+ local_irq_save(flags);
+ ret = s3c_gpio_do_getcfg(chip, offset);
+ local_irq_restore(flags);
+ }
+
+ return ret;
+}
+EXPORT_SYMBOL(s3c_gpio_getcfg);
+
+
int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull)
{
struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin);