aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-samsung.c
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2011-10-12 07:11:17 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-10-12 07:53:09 -0400
commitb82cee243633fbb734de704e38f57c771d7afd73 (patch)
tree093de4c5c6a9c2dd867fd5263c5d231c22e4a725 /drivers/gpio/gpio-samsung.c
parent6700397a8164f58a6637fa26d9fd752aa8cf2fd1 (diff)
gpio/samsung: Fix incorrect gpio pull up/down callback for EXYNOS4
Some of the gpio chips of exynos4 are assigned a default gpio config without the exynos4 specific pull up/down callbacks which resulted in incorrect setting of pull up/down configuration. Fix this by adding two new exynos4 specific entries in the array of default configs with set_pull and get_pull callbacks set to exynos4 specific callbacks The new default gpio configs can then be used for exynos4 gpio chips. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'drivers/gpio/gpio-samsung.c')
-rw-r--r--drivers/gpio/gpio-samsung.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index c87b65af8c96..de8788de759d 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -482,7 +482,14 @@ static struct samsung_gpio_cfg samsung_gpio_cfgs[] = {
482 }, { 482 }, {
483 .set_config = samsung_gpio_setcfg_2bit, 483 .set_config = samsung_gpio_setcfg_2bit,
484 .get_config = samsung_gpio_getcfg_2bit, 484 .get_config = samsung_gpio_getcfg_2bit,
485 }, 485 }, {
486 .set_pull = exynos4_gpio_setpull,
487 .get_pull = exynos4_gpio_getpull,
488 }, {
489 .cfg_eint = 0x3,
490 .set_pull = exynos4_gpio_setpull,
491 .get_pull = exynos4_gpio_getpull,
492 }
486}; 493};
487 494
488/* 495/*
@@ -2253,49 +2260,49 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = {
2253 .label = "GPL2", 2260 .label = "GPL2",
2254 }, 2261 },
2255 }, { 2262 }, {
2256 .config = &samsung_gpio_cfgs[0], 2263 .config = &samsung_gpio_cfgs[8],
2257 .chip = { 2264 .chip = {
2258 .base = EXYNOS4_GPY0(0), 2265 .base = EXYNOS4_GPY0(0),
2259 .ngpio = EXYNOS4_GPIO_Y0_NR, 2266 .ngpio = EXYNOS4_GPIO_Y0_NR,
2260 .label = "GPY0", 2267 .label = "GPY0",
2261 }, 2268 },
2262 }, { 2269 }, {
2263 .config = &samsung_gpio_cfgs[0], 2270 .config = &samsung_gpio_cfgs[8],
2264 .chip = { 2271 .chip = {
2265 .base = EXYNOS4_GPY1(0), 2272 .base = EXYNOS4_GPY1(0),
2266 .ngpio = EXYNOS4_GPIO_Y1_NR, 2273 .ngpio = EXYNOS4_GPIO_Y1_NR,
2267 .label = "GPY1", 2274 .label = "GPY1",
2268 }, 2275 },
2269 }, { 2276 }, {
2270 .config = &samsung_gpio_cfgs[0], 2277 .config = &samsung_gpio_cfgs[8],
2271 .chip = { 2278 .chip = {
2272 .base = EXYNOS4_GPY2(0), 2279 .base = EXYNOS4_GPY2(0),
2273 .ngpio = EXYNOS4_GPIO_Y2_NR, 2280 .ngpio = EXYNOS4_GPIO_Y2_NR,
2274 .label = "GPY2", 2281 .label = "GPY2",
2275 }, 2282 },
2276 }, { 2283 }, {
2277 .config = &samsung_gpio_cfgs[0], 2284 .config = &samsung_gpio_cfgs[8],
2278 .chip = { 2285 .chip = {
2279 .base = EXYNOS4_GPY3(0), 2286 .base = EXYNOS4_GPY3(0),
2280 .ngpio = EXYNOS4_GPIO_Y3_NR, 2287 .ngpio = EXYNOS4_GPIO_Y3_NR,
2281 .label = "GPY3", 2288 .label = "GPY3",
2282 }, 2289 },
2283 }, { 2290 }, {
2284 .config = &samsung_gpio_cfgs[0], 2291 .config = &samsung_gpio_cfgs[8],
2285 .chip = { 2292 .chip = {
2286 .base = EXYNOS4_GPY4(0), 2293 .base = EXYNOS4_GPY4(0),
2287 .ngpio = EXYNOS4_GPIO_Y4_NR, 2294 .ngpio = EXYNOS4_GPIO_Y4_NR,
2288 .label = "GPY4", 2295 .label = "GPY4",
2289 }, 2296 },
2290 }, { 2297 }, {
2291 .config = &samsung_gpio_cfgs[0], 2298 .config = &samsung_gpio_cfgs[8],
2292 .chip = { 2299 .chip = {
2293 .base = EXYNOS4_GPY5(0), 2300 .base = EXYNOS4_GPY5(0),
2294 .ngpio = EXYNOS4_GPIO_Y5_NR, 2301 .ngpio = EXYNOS4_GPIO_Y5_NR,
2295 .label = "GPY5", 2302 .label = "GPY5",
2296 }, 2303 },
2297 }, { 2304 }, {
2298 .config = &samsung_gpio_cfgs[0], 2305 .config = &samsung_gpio_cfgs[8],
2299 .chip = { 2306 .chip = {
2300 .base = EXYNOS4_GPY6(0), 2307 .base = EXYNOS4_GPY6(0),
2301 .ngpio = EXYNOS4_GPIO_Y6_NR, 2308 .ngpio = EXYNOS4_GPIO_Y6_NR,
@@ -2303,7 +2310,7 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = {
2303 }, 2310 },
2304 }, { 2311 }, {
2305 .base = (S5P_VA_GPIO2 + 0xC00), 2312 .base = (S5P_VA_GPIO2 + 0xC00),
2306 .config = &samsung_gpio_cfgs[3], 2313 .config = &samsung_gpio_cfgs[9],
2307 .irq_base = IRQ_EINT(0), 2314 .irq_base = IRQ_EINT(0),
2308 .chip = { 2315 .chip = {
2309 .base = EXYNOS4_GPX0(0), 2316 .base = EXYNOS4_GPX0(0),
@@ -2313,7 +2320,7 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = {
2313 }, 2320 },
2314 }, { 2321 }, {
2315 .base = (S5P_VA_GPIO2 + 0xC20), 2322 .base = (S5P_VA_GPIO2 + 0xC20),
2316 .config = &samsung_gpio_cfgs[3], 2323 .config = &samsung_gpio_cfgs[9],
2317 .irq_base = IRQ_EINT(8), 2324 .irq_base = IRQ_EINT(8),
2318 .chip = { 2325 .chip = {
2319 .base = EXYNOS4_GPX1(0), 2326 .base = EXYNOS4_GPX1(0),
@@ -2323,7 +2330,7 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = {
2323 }, 2330 },
2324 }, { 2331 }, {
2325 .base = (S5P_VA_GPIO2 + 0xC40), 2332 .base = (S5P_VA_GPIO2 + 0xC40),
2326 .config = &samsung_gpio_cfgs[3], 2333 .config = &samsung_gpio_cfgs[9],
2327 .irq_base = IRQ_EINT(16), 2334 .irq_base = IRQ_EINT(16),
2328 .chip = { 2335 .chip = {
2329 .base = EXYNOS4_GPX2(0), 2336 .base = EXYNOS4_GPX2(0),
@@ -2333,7 +2340,7 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = {
2333 }, 2340 },
2334 }, { 2341 }, {
2335 .base = (S5P_VA_GPIO2 + 0xC60), 2342 .base = (S5P_VA_GPIO2 + 0xC60),
2336 .config = &samsung_gpio_cfgs[3], 2343 .config = &samsung_gpio_cfgs[9],
2337 .irq_base = IRQ_EINT(24), 2344 .irq_base = IRQ_EINT(24),
2338 .chip = { 2345 .chip = {
2339 .base = EXYNOS4_GPX3(0), 2346 .base = EXYNOS4_GPX3(0),