[PATCH 01/10] fix-backlight-too-early.patch

Andy Green andy at openmoko.com
Mon Dec 1 02:25:11 CET 2008


This moves the backlight init to right before the backlight device init
during the jbt6k74 probe callback... it guarantees video is up and the lcm
is configured before we bring up backlight and so removes the white flash
during boot, the all-black framebuffer is instead shown smoothly and
cleanly.

Signed-off-by: Andy Green <andy at openmoko.com>
---

 arch/arm/mach-s3c2440/mach-gta02.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index dcf0d99..193a75d 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -1094,6 +1094,14 @@ static void gta02_jbt6k74_reset(int devidx, int level)
 
 static void gta02_jbt6k74_probe_completed(struct device *dev)
 {
+	struct pcf50633 *pcf = gta02_pcf_pdata.pcf;
+
+	/* Switch on backlight. Qi does not do it for us */
+	pcf50633_reg_write(pcf, PCF50633_REG_LEDOUT, 0x01);
+	pcf50633_reg_write(pcf, PCF50633_REG_LEDENA, 0x00);
+	pcf50633_reg_write(pcf, PCF50633_REG_LEDDIM, 0x01);
+	pcf50633_reg_write(pcf, PCF50633_REG_LEDENA, 0x01);
+
 	gta02_bl_dev.dev.parent = dev;
 	platform_device_register(&gta02_bl_dev);
 }
@@ -1652,12 +1660,6 @@ static void gta02_pmu_attach_child_devices(struct pcf50633 *pcf)
 	mangle_glamo_res_by_system_rev();
 	platform_add_devices(gta02_devices_pmu_children,
 					ARRAY_SIZE(gta02_devices_pmu_children));
-
-	/* Switch on backlight. Qi does not do it for us */
-	pcf50633_reg_write(pcf, PCF50633_REG_LEDENA, 0x00);
-	pcf50633_reg_write(pcf, PCF50633_REG_LEDDIM, 0x01);
-	pcf50633_reg_write(pcf, PCF50633_REG_LEDENA, 0x01);
-	pcf50633_reg_write(pcf, PCF50633_REG_LEDOUT, 0x3f);
 }
 
 




More information about the openmoko-kernel mailing list