Skip to content

Commit

Permalink
[ARM] pxa/spitz: fix spi cs on spitz
Browse files Browse the repository at this point in the history
On spitz configure SPI CS GPIOs as outputs to unbreak spi chip selection.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
  • Loading branch information
Dmitry Baryshkov authored and Eric Miao committed Oct 29, 2008
1 parent e946217 commit b6e642e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arch/arm/mach-pxa/spitz.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:
Expand Down

0 comments on commit b6e642e

Please sign in to comment.