Commit f90715f9 authored by Kukjin Kim's avatar Kukjin Kim

ARM: S5P64X0: Change to using s3c_gpio_cfgall_range()

Change the code setting a range of GPIO pins' configuration and
pull state to use the recently introduced s3c_gpio_cfgall_range().

Mop up a few missed s3c_gpio_cfgpin_range() changes.
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent 70081472
...@@ -44,16 +44,10 @@ static int s5p6440_spi_cfg_gpio(struct platform_device *pdev) ...@@ -44,16 +44,10 @@ static int s5p6440_spi_cfg_gpio(struct platform_device *pdev)
switch (pdev->id) { switch (pdev->id) {
case 0: case 0:
base = S5P6440_GPC(0); base = S5P6440_GPC(0);
s3c_gpio_setpull(S5P6440_GPC(0), S3C_GPIO_PULL_UP);
s3c_gpio_setpull(S5P6440_GPC(1), S3C_GPIO_PULL_UP);
s3c_gpio_setpull(S5P6440_GPC(2), S3C_GPIO_PULL_UP);
break; break;
case 1: case 1:
base = S5P6440_GPC(4); base = S5P6440_GPC(4);
s3c_gpio_setpull(S5P6440_GPC(4), S3C_GPIO_PULL_UP);
s3c_gpio_setpull(S5P6440_GPC(5), S3C_GPIO_PULL_UP);
s3c_gpio_setpull(S5P6440_GPC(6), S3C_GPIO_PULL_UP);
break; break;
default: default:
...@@ -61,7 +55,8 @@ static int s5p6440_spi_cfg_gpio(struct platform_device *pdev) ...@@ -61,7 +55,8 @@ static int s5p6440_spi_cfg_gpio(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
} }
s3c_gpio_cfgpin_range(base, 3, S3C_GPIO_SFN(2)); s3c_gpio_cfgall_range(base, 3,
S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
return 0; return 0;
} }
...@@ -73,16 +68,10 @@ static int s5p6450_spi_cfg_gpio(struct platform_device *pdev) ...@@ -73,16 +68,10 @@ static int s5p6450_spi_cfg_gpio(struct platform_device *pdev)
switch (pdev->id) { switch (pdev->id) {
case 0: case 0:
base = S5P6450_GPC(0); base = S5P6450_GPC(0);
s3c_gpio_setpull(S5P6450_GPC(0), S3C_GPIO_PULL_UP);
s3c_gpio_setpull(S5P6450_GPC(1), S3C_GPIO_PULL_UP);
s3c_gpio_setpull(S5P6450_GPC(2), S3C_GPIO_PULL_UP);
break; break;
case 1: case 1:
base = S5P6450_GPC(4); base = S5P6450_GPC(4);
s3c_gpio_setpull(S5P6450_GPC(4), S3C_GPIO_PULL_UP);
s3c_gpio_setpull(S5P6450_GPC(5), S3C_GPIO_PULL_UP);
s3c_gpio_setpull(S5P6450_GPC(6), S3C_GPIO_PULL_UP);
break; break;
default: default:
...@@ -90,7 +79,8 @@ static int s5p6450_spi_cfg_gpio(struct platform_device *pdev) ...@@ -90,7 +79,8 @@ static int s5p6450_spi_cfg_gpio(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
} }
s3c_gpio_cfgpin_range(base, 3, S3C_GPIO_SFN(2)); s3c_gpio_cfgall_range(base, 3,
S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
return 0; return 0;
} }
......
...@@ -25,16 +25,14 @@ struct platform_device; /* don't need the contents */ ...@@ -25,16 +25,14 @@ struct platform_device; /* don't need the contents */
void s5p6440_i2c0_cfg_gpio(struct platform_device *dev) void s5p6440_i2c0_cfg_gpio(struct platform_device *dev)
{ {
s3c_gpio_cfgpin_range(S5P6440_GPB(5), 2, S3C_GPIO_SFN(2)); s3c_gpio_cfgall_range(S5P6440_GPB(5), 2,
s3c_gpio_setpull(S5P6440_GPB(5), S3C_GPIO_PULL_UP); S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
s3c_gpio_setpull(S5P6440_GPB(6), S3C_GPIO_PULL_UP);
} }
void s5p6450_i2c0_cfg_gpio(struct platform_device *dev) void s5p6450_i2c0_cfg_gpio(struct platform_device *dev)
{ {
s3c_gpio_cfgpin_range(S5P6450_GPB(5), 2, S3C_GPIO_SFN(2)); s3c_gpio_cfgall_range(S5P6450_GPB(5), 2,
s3c_gpio_setpull(S5P6450_GPB(5), S3C_GPIO_PULL_UP); S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
s3c_gpio_setpull(S5P6450_GPB(6), S3C_GPIO_PULL_UP);
} }
void s3c_i2c0_cfg_gpio(struct platform_device *dev) { } void s3c_i2c0_cfg_gpio(struct platform_device *dev) { }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment