diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-10-01 00:52:25 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-22 22:49:14 -0400 |
commit | 699afb75de3e7a32a802513864c869f41868c3c8 (patch) | |
tree | 0e362b05e750dec4cc4f2566a81ef98324137bf4 /arch/arm | |
parent | 2618b555d2734df3c8ca71df319d318489318083 (diff) |
ARM: S5P6442: Change to using s3c_gpio_cfgpin_range()
Change the code setting ranges of GPIO pins using s3c_gpio_cfgpin() to
use the recently introduced s3c_gpio_cfgpin_range().
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
[kgene.kim@samsung.com: fixed wrong change]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s5p6442/dev-audio.c | 30 | ||||
-rw-r--r-- | arch/arm/mach-s5p6442/dev-spi.c | 3 |
2 files changed, 11 insertions, 22 deletions
diff --git a/arch/arm/mach-s5p6442/dev-audio.c b/arch/arm/mach-s5p6442/dev-audio.c index 7a4e34720b7b..3462197ff352 100644 --- a/arch/arm/mach-s5p6442/dev-audio.c +++ b/arch/arm/mach-s5p6442/dev-audio.c | |||
@@ -21,22 +21,16 @@ | |||
21 | 21 | ||
22 | static int s5p6442_cfg_i2s(struct platform_device *pdev) | 22 | static int s5p6442_cfg_i2s(struct platform_device *pdev) |
23 | { | 23 | { |
24 | unsigned int base; | ||
25 | |||
24 | /* configure GPIO for i2s port */ | 26 | /* configure GPIO for i2s port */ |
25 | switch (pdev->id) { | 27 | switch (pdev->id) { |
26 | case 1: | 28 | case 1: |
27 | s3c_gpio_cfgpin(S5P6442_GPC1(0), S3C_GPIO_SFN(2)); | 29 | base = S5P6442_GPC1(0); |
28 | s3c_gpio_cfgpin(S5P6442_GPC1(1), S3C_GPIO_SFN(2)); | ||
29 | s3c_gpio_cfgpin(S5P6442_GPC1(2), S3C_GPIO_SFN(2)); | ||
30 | s3c_gpio_cfgpin(S5P6442_GPC1(3), S3C_GPIO_SFN(2)); | ||
31 | s3c_gpio_cfgpin(S5P6442_GPC1(4), S3C_GPIO_SFN(2)); | ||
32 | break; | 30 | break; |
33 | 31 | ||
34 | case -1: | 32 | case -1: |
35 | s3c_gpio_cfgpin(S5P6442_GPC0(0), S3C_GPIO_SFN(2)); | 33 | base = S5P6442_GPC0(0); |
36 | s3c_gpio_cfgpin(S5P6442_GPC0(1), S3C_GPIO_SFN(2)); | ||
37 | s3c_gpio_cfgpin(S5P6442_GPC0(2), S3C_GPIO_SFN(2)); | ||
38 | s3c_gpio_cfgpin(S5P6442_GPC0(3), S3C_GPIO_SFN(2)); | ||
39 | s3c_gpio_cfgpin(S5P6442_GPC0(4), S3C_GPIO_SFN(2)); | ||
40 | break; | 34 | break; |
41 | 35 | ||
42 | default: | 36 | default: |
@@ -44,6 +38,7 @@ static int s5p6442_cfg_i2s(struct platform_device *pdev) | |||
44 | return -EINVAL; | 38 | return -EINVAL; |
45 | } | 39 | } |
46 | 40 | ||
41 | s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(2)); | ||
47 | return 0; | 42 | return 0; |
48 | } | 43 | } |
49 | 44 | ||
@@ -111,21 +106,15 @@ struct platform_device s5p6442_device_iis1 = { | |||
111 | 106 | ||
112 | static int s5p6442_pcm_cfg_gpio(struct platform_device *pdev) | 107 | static int s5p6442_pcm_cfg_gpio(struct platform_device *pdev) |
113 | { | 108 | { |
109 | unsigned int base; | ||
110 | |||
114 | switch (pdev->id) { | 111 | switch (pdev->id) { |
115 | case 0: | 112 | case 0: |
116 | s3c_gpio_cfgpin(S5P6442_GPC0(0), S3C_GPIO_SFN(3)); | 113 | base = S5P6442_GPC0(0); |
117 | s3c_gpio_cfgpin(S5P6442_GPC0(1), S3C_GPIO_SFN(3)); | ||
118 | s3c_gpio_cfgpin(S5P6442_GPC0(2), S3C_GPIO_SFN(3)); | ||
119 | s3c_gpio_cfgpin(S5P6442_GPC0(3), S3C_GPIO_SFN(3)); | ||
120 | s3c_gpio_cfgpin(S5P6442_GPC0(4), S3C_GPIO_SFN(3)); | ||
121 | break; | 114 | break; |
122 | 115 | ||
123 | case 1: | 116 | case 1: |
124 | s3c_gpio_cfgpin(S5P6442_GPC1(0), S3C_GPIO_SFN(3)); | 117 | base = S5P6442_GPC1(0); |
125 | s3c_gpio_cfgpin(S5P6442_GPC1(1), S3C_GPIO_SFN(3)); | ||
126 | s3c_gpio_cfgpin(S5P6442_GPC1(2), S3C_GPIO_SFN(3)); | ||
127 | s3c_gpio_cfgpin(S5P6442_GPC1(3), S3C_GPIO_SFN(3)); | ||
128 | s3c_gpio_cfgpin(S5P6442_GPC1(4), S3C_GPIO_SFN(3)); | ||
129 | break; | 118 | break; |
130 | 119 | ||
131 | default: | 120 | default: |
@@ -133,6 +122,7 @@ static int s5p6442_pcm_cfg_gpio(struct platform_device *pdev) | |||
133 | return -EINVAL; | 122 | return -EINVAL; |
134 | } | 123 | } |
135 | 124 | ||
125 | s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(3)); | ||
136 | return 0; | 126 | return 0; |
137 | } | 127 | } |
138 | 128 | ||
diff --git a/arch/arm/mach-s5p6442/dev-spi.c b/arch/arm/mach-s5p6442/dev-spi.c index e894651a88bd..547c570f689a 100644 --- a/arch/arm/mach-s5p6442/dev-spi.c +++ b/arch/arm/mach-s5p6442/dev-spi.c | |||
@@ -38,8 +38,7 @@ static int s5p6442_spi_cfg_gpio(struct platform_device *pdev) | |||
38 | switch (pdev->id) { | 38 | switch (pdev->id) { |
39 | case 0: | 39 | case 0: |
40 | s3c_gpio_cfgpin(S5P6442_GPB(0), S3C_GPIO_SFN(2)); | 40 | s3c_gpio_cfgpin(S5P6442_GPB(0), S3C_GPIO_SFN(2)); |
41 | s3c_gpio_cfgpin(S5P6442_GPB(2), S3C_GPIO_SFN(2)); | 41 | s3c_gpio_cfgpin_range(S5P6442_GPB(2), 2, S3C_GPIO_SFN(2)); |
42 | s3c_gpio_cfgpin(S5P6442_GPB(3), S3C_GPIO_SFN(2)); | ||
43 | s3c_gpio_setpull(S5P6442_GPB(0), S3C_GPIO_PULL_UP); | 42 | s3c_gpio_setpull(S5P6442_GPB(0), S3C_GPIO_PULL_UP); |
44 | s3c_gpio_setpull(S5P6442_GPB(2), S3C_GPIO_PULL_UP); | 43 | s3c_gpio_setpull(S5P6442_GPB(2), S3C_GPIO_PULL_UP); |
45 | s3c_gpio_setpull(S5P6442_GPB(3), S3C_GPIO_PULL_UP); | 44 | s3c_gpio_setpull(S5P6442_GPB(3), S3C_GPIO_PULL_UP); |