From 29b3db33b44bcbb0d9c399aad9939446927c9516 Mon Sep 17 00:00:00 2001 From: "Rich.jiangyk" Date: Thu, 16 Sep 2010 15:00:10 +0800 Subject: [PATCH] update rk2818_backlight.c to correct bl suspend and resume 1. old rk2818_backlight.c use CONFIG_ANDROID_POWER macro, which is no longer supported, lyx changed to use CONFIG_HAS_EARLYSUSPEND. This sovled lcd blanking when resuming. 2. changed backlight module init into late_initcall from rootfs_initcall, this solve the problem of blanking when powered on. 3. updated: close dbg info and comments. note: code mod by lyx, commited by jyk --- drivers/video/backlight/rk2818_backlight.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/video/backlight/rk2818_backlight.c b/drivers/video/backlight/rk2818_backlight.c index e44f2e3d1db5..759b79adc239 100644 --- a/drivers/video/backlight/rk2818_backlight.c +++ b/drivers/video/backlight/rk2818_backlight.c @@ -41,7 +41,7 @@ /* * Debug */ -#if 1 +#if 0 #define DBG(x...) printk(KERN_INFO x) #else #define DBG(x...) @@ -193,7 +193,9 @@ static void rk2818_bl_suspend(struct early_suspend *h) } else { divh = div_total; } - DBG("%s: ========== jyk suspend =============== \n",__func__); + + DBG("%s: ========== suspend =============== \n",__func__); + write_pwm_reg(id, PWM_REG_HRC, divh); suspend_flag = 1; @@ -242,7 +244,7 @@ static int rk2818_backlight_probe(struct platform_device *pdev) u32 divh, div_total; struct clk* arm_pclk; - DBG("%s::============== jyk ==========================\n",__func__); + DBG("%s::=======================================\n",__func__); if (rk2818_bl) { DBG(KERN_CRIT "%s: backlight device register has existed \n", -- 2.34.1