diff options
author | Mike Rapoport <mike@compulab.co.il> | 2009-04-14 01:33:49 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-06-04 22:32:06 -0400 |
commit | 46580c03062da8c047238a6b3d2b2b13af1700b5 (patch) | |
tree | 5e047813eb34ca78c7287262c0fb9917a79f5691 /arch/arm/mach-pxa/littleton.c | |
parent | a27ba768a11ac7a1d56688d4224cef3a802d1f89 (diff) |
[ARM] pxa: update pxa2xx_spi_chip initialization to use .gpio_cs field
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa/littleton.c')
-rw-r--r-- | arch/arm/mach-pxa/littleton.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index ad5378b1af94..94a32321ad43 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
@@ -179,15 +179,10 @@ static struct pxa2xx_spi_master littleton_spi_info = { | |||
179 | .num_chipselect = 1, | 179 | .num_chipselect = 1, |
180 | }; | 180 | }; |
181 | 181 | ||
182 | static void littleton_tdo24m_cs(u32 cmd) | ||
183 | { | ||
184 | gpio_set_value(LITTLETON_GPIO_LCD_CS, !(cmd == PXA2XX_CS_ASSERT)); | ||
185 | } | ||
186 | |||
187 | static struct pxa2xx_spi_chip littleton_tdo24m_chip = { | 182 | static struct pxa2xx_spi_chip littleton_tdo24m_chip = { |
188 | .rx_threshold = 1, | 183 | .rx_threshold = 1, |
189 | .tx_threshold = 1, | 184 | .tx_threshold = 1, |
190 | .cs_control = littleton_tdo24m_cs, | 185 | .gpio_cs = LITTLETON_GPIO_LCD_CS, |
191 | }; | 186 | }; |
192 | 187 | ||
193 | static struct spi_board_info littleton_spi_devices[] __initdata = { | 188 | static struct spi_board_info littleton_spi_devices[] __initdata = { |
@@ -202,16 +197,6 @@ static struct spi_board_info littleton_spi_devices[] __initdata = { | |||
202 | 197 | ||
203 | static void __init littleton_init_spi(void) | 198 | static void __init littleton_init_spi(void) |
204 | { | 199 | { |
205 | int err; | ||
206 | |||
207 | err = gpio_request(LITTLETON_GPIO_LCD_CS, "LCD_CS"); | ||
208 | if (err) { | ||
209 | pr_warning("failed to request GPIO for LCS CS\n"); | ||
210 | return; | ||
211 | } | ||
212 | |||
213 | gpio_direction_output(LITTLETON_GPIO_LCD_CS, 1); | ||
214 | |||
215 | pxa2xx_set_spi_info(2, &littleton_spi_info); | 200 | pxa2xx_set_spi_info(2, &littleton_spi_info); |
216 | spi_register_board_info(ARRAY_AND_SIZE(littleton_spi_devices)); | 201 | spi_register_board_info(ARRAY_AND_SIZE(littleton_spi_devices)); |
217 | } | 202 | } |