diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-25 02:57:16 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-25 02:57:16 -0400 |
commit | 4d9374f39e40f7c7fc15acbfe01dceeee850509f (patch) | |
tree | 31ec5c2ae0ae753a7bdb5a34f3a607fdda2db6c6 /arch/arm/plat-samsung/include | |
parent | dc6c0ca39daad44f3169656296ef81d39a6dc7f5 (diff) | |
parent | dff2126c548d54b040997257407a69a6cdf7a5b6 (diff) |
Merge branch 'next-gpio-update' into for-next
Diffstat (limited to 'arch/arm/plat-samsung/include')
-rw-r--r-- | arch/arm/plat-samsung/include/plat/gpio-cfg.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/plat-samsung/include/plat/gpio-cfg.h index 5b43b95da68..e4b5cf126fa 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg.h | |||
@@ -108,6 +108,19 @@ extern int s3c_gpio_cfgpin(unsigned int pin, unsigned int to); | |||
108 | */ | 108 | */ |
109 | extern unsigned s3c_gpio_getcfg(unsigned int pin); | 109 | extern unsigned s3c_gpio_getcfg(unsigned int pin); |
110 | 110 | ||
111 | /** | ||
112 | * s3c_gpio_cfgpin_range() - Change the GPIO function for configuring pin range | ||
113 | * @start: The pin number to start at | ||
114 | * @nr: The number of pins to configure from @start. | ||
115 | * @cfg: The configuration for the pin's function | ||
116 | * | ||
117 | * Call s3c_gpio_cfgpin() for the @nr pins starting at @start. | ||
118 | * | ||
119 | * @sa s3c_gpio_cfgpin. | ||
120 | */ | ||
121 | extern int s3c_gpio_cfgpin_range(unsigned int start, unsigned int nr, | ||
122 | unsigned int cfg); | ||
123 | |||
111 | /* Define values for the pull-{up,down} available for each gpio pin. | 124 | /* Define values for the pull-{up,down} available for each gpio pin. |
112 | * | 125 | * |
113 | * These values control the state of the weak pull-{up,down} resistors | 126 | * These values control the state of the weak pull-{up,down} resistors |
@@ -140,6 +153,31 @@ extern int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull); | |||
140 | */ | 153 | */ |
141 | extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin); | 154 | extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin); |
142 | 155 | ||
156 | /* configure `all` aspects of an gpio */ | ||
157 | |||
158 | /** | ||
159 | * s3c_gpio_cfgall_range() - configure range of gpio functtion and pull. | ||
160 | * @start: The gpio number to start at. | ||
161 | * @nr: The number of gpio to configure from @start. | ||
162 | * @cfg: The configuration to use | ||
163 | * @pull: The pull setting to use. | ||
164 | * | ||
165 | * Run s3c_gpio_cfgpin() and s3c_gpio_setpull() over the gpio range starting | ||
166 | * @gpio and running for @size. | ||
167 | * | ||
168 | * @sa s3c_gpio_cfgpin | ||
169 | * @sa s3c_gpio_setpull | ||
170 | * @sa s3c_gpio_cfgpin_range | ||
171 | */ | ||
172 | extern int s3c_gpio_cfgall_range(unsigned int start, unsigned int nr, | ||
173 | unsigned int cfg, s3c_gpio_pull_t pull); | ||
174 | |||
175 | static inline int s3c_gpio_cfgrange_nopull(unsigned int pin, unsigned int size, | ||
176 | unsigned int cfg) | ||
177 | { | ||
178 | return s3c_gpio_cfgall_range(pin, size, cfg, S3C_GPIO_PULL_NONE); | ||
179 | } | ||
180 | |||
143 | /* Define values for the drvstr available for each gpio pin. | 181 | /* Define values for the drvstr available for each gpio pin. |
144 | * | 182 | * |
145 | * These values control the value of the output signal driver strength, | 183 | * These values control the value of the output signal driver strength, |