From 138ebc323ada43894ab46ca34c5479e662044e15 Mon Sep 17 00:00:00 2001 From: LeTama Date: Thu, 25 Nov 2010 15:35:38 +0100 Subject: [PATCH] htcleo: fix audio skip on wakeup for auo panel --- arch/arm/mach-msm/board-htcleo-panel.c | 53 +++++++++++++------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/arch/arm/mach-msm/board-htcleo-panel.c b/arch/arm/mach-msm/board-htcleo-panel.c index 1f5bcff1..a7a701da 100644 --- a/arch/arm/mach-msm/board-htcleo-panel.c +++ b/arch/arm/mach-msm/board-htcleo-panel.c @@ -659,40 +659,41 @@ static int auo_panel_init(struct msm_lcdc_panel_ops *ops) return 0; } +static void auo_panel_unblank_do_work(struct work_struct *w) +{ + gpio_set_value(HTCLEO_GPIO_LCM_POWER, 1); + LCM_DELAY(2); + vreg_enable(vreg_lcd); + LCM_DELAY(2); + + gpio_set_value(HTCLEO_GPIO_LCM_RESET, 1); + LCM_DELAY(1); + gpio_set_value(HTCLEO_GPIO_LCM_RESET, 0); + LCM_DELAY(1); + gpio_set_value(HTCLEO_GPIO_LCM_RESET, 1); + LCM_DELAY(25); + + spi_gpio_switch(1); + panel_gpio_switch(1); + + LCM_DELAY(33); + + auo_panel_cfg_setup(1); + + LCM_DELAY(1); +} + +static DECLARE_WORK(auo_unblank_work, auo_panel_unblank_do_work); + static int auo_panel_unblank(struct msm_lcdc_panel_ops *ops) { static int first_start=1; pr_info("%s\n", __func__); if(!first_start) { - - mutex_lock(&panel_lock); - - gpio_set_value(HTCLEO_GPIO_LCM_POWER, 1); - LCM_DELAY(2); - vreg_enable(vreg_lcd); - LCM_DELAY(2); - - gpio_set_value(HTCLEO_GPIO_LCM_RESET, 1); - LCM_DELAY(1); - gpio_set_value(HTCLEO_GPIO_LCM_RESET, 0); - LCM_DELAY(1); - gpio_set_value(HTCLEO_GPIO_LCM_RESET, 1); - LCM_DELAY(25); - - spi_gpio_switch(1); - panel_gpio_switch(1); - - LCM_DELAY(33); - - auo_panel_cfg_setup(1); - - LCM_DELAY(1); - - mutex_unlock(&panel_lock); + schedule_work(&auo_unblank_work); } else first_start=0; - return 0; }