Fixed GPIO_SSEL0 default state to output (from input). Fixes an
authorKevin Wells <wellsk40@gmail.com>
Wed, 18 Aug 2010 17:19:39 +0000 (10:19 -0700)
committerKevin Wells <wellsk40@gmail.com>
Wed, 18 Aug 2010 17:19:39 +0000 (10:19 -0700)
issue with the LCD SPI CS remaining driven and holding the SPI
data bus when other SPI peripherals are in use.

arch/arm/mach-lpc32xx/ea3250.c

index 320f913..17a2b8a 100644 (file)
@@ -56,6 +56,7 @@
 #define        LCD_CS_GPIO     LPC32XX_GPIO(LPC32XX_GPO_P3_GRP, 4)
 #define        LCD_RS_GPIO     LPC32XX_GPIO(LPC32XX_GPO_P3_GRP, 5)
 #define        BKL_POW_GPIO    LPC32XX_GPIO(LPC32XX_GPO_P3_GRP, 14)
+#define        SSEL0_GPIO5     LPC32XX_GPIO(LPC32XX_GPIO_P3_GRP, 5)
 
 /*
  * LCD controller functions
@@ -311,6 +312,11 @@ static int lpc32xx_clcd_setup(struct clcd_fb *fb)
         fb->fb.fix.smem_len = PANEL_SIZE;
         fb->panel = &conn_lcd_panel;
 
+       if (gpio_request(SSEL0_GPIO5, "Unused GPIO5 input"))
+               return -EIO;
+       if(gpio_direction_input(SSEL0_GPIO5))
+               return -EIO;
+
         /* Configure LCDC RS GPIO pin */
         if (gpio_request(LCD_RS_GPIO, "LCDC RS"))
                 return -EIO;