omap3evm: Change TWL related gpio API's to gpio*_cansleep
authorVaibhav Hiremath <hvaibhav@ti.com>
Tue, 25 Jan 2011 17:37:37 +0000 (17:37 +0000)
committerTony Lindgren <tony@atomide.com>
Thu, 17 Feb 2011 22:16:09 +0000 (14:16 -0800)
Since TWL GPIO's can go into sleep, and using normal
gpio_get/set_value() API will lead to kernel dump (WARN_ON()).
So replacing standard gpio_get/set_value() to
gpio_get/set_value_cansleep().

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Charulatha V <charu@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-omap3evm.c

index b9f954e..80c9f8a 100644 (file)
@@ -270,9 +270,9 @@ static int omap3_evm_enable_lcd(struct omap_dss_device *dssdev)
        gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0);
 
        if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
-               gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
+               gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
        else
-               gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
+               gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
 
        lcd_enabled = 1;
        return 0;
@@ -283,9 +283,9 @@ static void omap3_evm_disable_lcd(struct omap_dss_device *dssdev)
        gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1);
 
        if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
-               gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
+               gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
        else
-               gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
+               gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
 
        lcd_enabled = 0;
 }
@@ -324,7 +324,7 @@ static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev)
                return -EINVAL;
        }
 
-       gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 1);
+       gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1);
 
        dvi_enabled = 1;
        return 0;
@@ -332,7 +332,7 @@ static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev)
 
 static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev)
 {
-       gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 0);
+       gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0);
 
        dvi_enabled = 0;
 }