update rk2818_backlight.c to correct bl suspend and resume
authorRich.jiangyk <jyk@rock-chips.com>
Thu, 16 Sep 2010 07:00:10 +0000 (15:00 +0800)
committerRich.jiangyk <jyk@rock-chips.com>
Thu, 16 Sep 2010 08:45:40 +0000 (16:45 +0800)
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

index e44f2e3d1db52e1c3a97077dde62ade2ab0d27e6..759b79adc239af658fd6accead598f1125235c6a 100644 (file)
@@ -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",