aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/poodle.c
diff options
context:
space:
mode:
authorMike Rapoport <mike@compulab.co.il>2009-04-14 01:33:49 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-06-04 22:32:06 -0400
commit46580c03062da8c047238a6b3d2b2b13af1700b5 (patch)
tree5e047813eb34ca78c7287262c0fb9917a79f5691 /arch/arm/mach-pxa/poodle.c
parenta27ba768a11ac7a1d56688d4224cef3a802d1f89 (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/poodle.c')
-rw-r--r--arch/arm/mach-pxa/poodle.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 74f4ce600ca..ac431ed1039 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -214,13 +214,8 @@ static struct ads7846_platform_data poodle_ads7846_info = {
214 .gpio_pendown = POODLE_GPIO_TP_INT, 214 .gpio_pendown = POODLE_GPIO_TP_INT,
215}; 215};
216 216
217static void ads7846_cs(u32 command)
218{
219 gpio_set_value(POODLE_GPIO_TP_CS, !(command == PXA2XX_CS_ASSERT));
220}
221
222static struct pxa2xx_spi_chip poodle_ads7846_chip = { 217static struct pxa2xx_spi_chip poodle_ads7846_chip = {
223 .cs_control = ads7846_cs, 218 .gpio_cs = POODLE_GPIO_TP_CS,
224}; 219};
225 220
226static struct spi_board_info poodle_spi_devices[] = { 221static struct spi_board_info poodle_spi_devices[] = {
@@ -236,14 +231,6 @@ static struct spi_board_info poodle_spi_devices[] = {
236 231
237static void __init poodle_init_spi(void) 232static void __init poodle_init_spi(void)
238{ 233{
239 int err;
240
241 err = gpio_request(POODLE_GPIO_TP_CS, "ADS7846_CS");
242 if (err)
243 return;
244
245 gpio_direction_output(POODLE_GPIO_TP_CS, 1);
246
247 pxa2xx_set_spi_info(1, &poodle_spi_info); 234 pxa2xx_set_spi_info(1, &poodle_spi_info);
248 spi_register_board_info(ARRAY_AND_SIZE(poodle_spi_devices)); 235 spi_register_board_info(ARRAY_AND_SIZE(poodle_spi_devices));
249} 236}