From b6e642e498097e3d66e25ee9499f7719976263cf Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov <[dbaryshkov@gmail.com]> Date: Wed, 29 Oct 2008 11:40:46 +0800 Subject: [ARM] pxa/spitz: fix spi cs on spitz On spitz configure SPI CS GPIOs as outputs to unbreak spi chip selection. Signed-off-by: Dmitry Baryshkov Signed-off-by: Eric Miao --- arch/arm/mach-pxa/spitz.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 524f656dc56..f0a5bbae0b4 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -385,6 +385,16 @@ static void __init spitz_init_spi(void) if (err) goto err_free_2; + err = gpio_direction_output(SPITZ_GPIO_ADS7846_CS, 1); + if (err) + goto err_free_3; + err = gpio_direction_output(SPITZ_GPIO_LCDCON_CS, 1); + if (err) + goto err_free_3; + err = gpio_direction_output(SPITZ_GPIO_MAX1111_CS, 1); + if (err) + goto err_free_3; + if (machine_is_akita()) { spitz_lcdcon_info.gpio_backlight_cont = AKITA_GPIO_BACKLIGHT_CONT; spitz_lcdcon_info.gpio_backlight_on = AKITA_GPIO_BACKLIGHT_ON; @@ -394,6 +404,8 @@ static void __init spitz_init_spi(void) spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); return; +err_free_3: + gpio_free(SPITZ_GPIO_MAX1111_CS); err_free_2: gpio_free(SPITZ_GPIO_LCDCON_CS); err_free_1: -- cgit v1.2.3