diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-05-04 02:01:44 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-05 20:32:30 -0400 |
commit | eee2b94f01f7379940a656af8ef097749ce025b5 (patch) | |
tree | 710ff6594a5619df3ffc48b1a661ce68de5cc1a8 /arch/arm/mach-s3c2410/include/mach | |
parent | 40b956f026a3303a67d2ab7fffa2331f72e1e019 (diff) |
ARM: S3C24XX: Remove s3c2410_gpio_setcfg()
Remove the implementation of s3c2410_gpio_setcfg() as it should now be
functionally equivalent to s3c_gpio_cfgpin(), and add a wrapper for those
drivers that are still using this call.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c2410/include/mach')
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/gpio-fns.h | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-fns.h b/arch/arm/mach-s3c2410/include/mach/gpio-fns.h index 035a493952db..f50c2a5f7ab3 100644 --- a/arch/arm/mach-s3c2410/include/mach/gpio-fns.h +++ b/arch/arm/mach-s3c2410/include/mach/gpio-fns.h | |||
@@ -10,14 +10,28 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef __MACH_GPIO_FNS_H | ||
14 | #define __MACH_GPIO_FNS_H __FILE__ | ||
15 | |||
13 | /* These functions are in the to-be-removed category and it is strongly | 16 | /* These functions are in the to-be-removed category and it is strongly |
14 | * encouraged not to use these in new code. They will be marked deprecated | 17 | * encouraged not to use these in new code. They will be marked deprecated |
15 | * very soon. | 18 | * very soon. |
16 | * | 19 | * |
17 | * Most of the functionality can be either replaced by the gpiocfg calls | 20 | * Most of the functionality can be either replaced by the gpiocfg calls |
18 | * for the s3c platform or by the generic GPIOlib API. | 21 | * for the s3c platform or by the generic GPIOlib API. |
22 | * | ||
23 | * As of 2.6.35-rc, these will be removed, with the few drivers using them | ||
24 | * either replaced or given a wrapper until the calls can be removed. | ||
19 | */ | 25 | */ |
20 | 26 | ||
27 | #include <plat/gpio-cfg.h> | ||
28 | |||
29 | static inline void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int cfg) | ||
30 | { | ||
31 | /* 1:1 mapping between cfgpin and setcfg calls at the moment */ | ||
32 | s3c_gpio_cfgpin(pin, cfg); | ||
33 | } | ||
34 | |||
21 | /* external functions for GPIO support | 35 | /* external functions for GPIO support |
22 | * | 36 | * |
23 | * These allow various different clients to access the same GPIO | 37 | * These allow various different clients to access the same GPIO |
@@ -25,17 +39,6 @@ | |||
25 | * GPIO register, then it is safe to ioremap/__raw_{read|write} to it. | 39 | * GPIO register, then it is safe to ioremap/__raw_{read|write} to it. |
26 | */ | 40 | */ |
27 | 41 | ||
28 | /* s3c2410_gpio_cfgpin | ||
29 | * | ||
30 | * set the configuration of the given pin to the value passed. | ||
31 | * | ||
32 | * eg: | ||
33 | * s3c2410_gpio_cfgpin(S3C2410_GPA(0), S3C2410_GPA0_ADDR0); | ||
34 | * s3c2410_gpio_cfgpin(S3C2410_GPE(8), S3C2410_GPE8_SDDAT1); | ||
35 | */ | ||
36 | |||
37 | extern void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function); | ||
38 | |||
39 | extern unsigned int s3c2410_gpio_getcfg(unsigned int pin); | 42 | extern unsigned int s3c2410_gpio_getcfg(unsigned int pin); |
40 | 43 | ||
41 | /* s3c2410_gpio_getirq | 44 | /* s3c2410_gpio_getirq |
@@ -73,6 +76,14 @@ extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on, | |||
73 | 76 | ||
74 | /* s3c2410_gpio_pullup | 77 | /* s3c2410_gpio_pullup |
75 | * | 78 | * |
79 | * This call should be replaced with s3c_gpio_setpull(). | ||
80 | * | ||
81 | * As a note, there is currently no distinction between pull-up and pull-down | ||
82 | * in the s3c24xx series devices with only an on/off configuration. | ||
83 | */ | ||
84 | |||
85 | /* s3c2410_gpio_pullup | ||
86 | * | ||
76 | * configure the pull-up control on the given pin | 87 | * configure the pull-up control on the given pin |
77 | * | 88 | * |
78 | * to = 1 => disable the pull-up | 89 | * to = 1 => disable the pull-up |
@@ -101,3 +112,5 @@ extern int s3c2410_gpio_getpull(unsigned int pin); | |||
101 | extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to); | 112 | extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to); |
102 | 113 | ||
103 | extern unsigned int s3c2410_gpio_getpin(unsigned int pin); | 114 | extern unsigned int s3c2410_gpio_getpin(unsigned int pin); |
115 | |||
116 | #endif /* __MACH_GPIO_FNS_H */ | ||