[pkg-fso-commits] [SCM] linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko branch, stable, updated. upstream/20080808.git43620428-24-gca19d15

Andy Green agreen at pads.home.warmcat.com
Mon Oct 20 09:46:22 UTC 2008


The following commit has been merged in the stable branch:
commit 9ee405d79609106ea330b21d54f30b853e262296
Author: Mike Westerhof <mwester at dls.net>
Date:   Fri Aug 8 13:10:59 2008 +0100

    fix-suspend-backlight-timing-gta01.patch
    
        This patch adds the gta01 backlight callback that defers the
        restoring of the backlight until after the jbt driver has
        resumed.  This doesn't eliminate the flashing of the LCD on
        the gta01, but it reduces it considerably.
    
    Signed-off-by: Mike Westerhof <mwester at dls.net>

diff --git a/arch/arm/mach-s3c2410/mach-gta01.c b/arch/arm/mach-s3c2410/mach-gta01.c
index f3f87cf..9e42df0 100644
--- a/arch/arm/mach-s3c2410/mach-gta01.c
+++ b/arch/arm/mach-s3c2410/mach-gta01.c
@@ -507,14 +507,20 @@ static struct s3c2410_ts_mach_info gta01_ts_cfg = {
 
 /* SPI */
 
-void gta01_jbt6k74_reset(int devidx, int level)
+static void gta01_jbt6k74_reset(int devidx, int level)
 {
 	/* empty place holder; gta01 does not yet use this */
 	printk(KERN_DEBUG "gta01_jbt6k74_reset\n");
 }
 
+static void gta01_jbt6k74_resuming(int devidx)
+{
+	gta01bl_deferred_resume();
+}
+
 const struct jbt6k74_platform_data gta01_jbt6k74_pdata = {
 	.reset		= gta01_jbt6k74_reset,
+	.resuming	= gta01_jbt6k74_resuming,
 };
 
 static struct spi_board_info gta01_spi_board_info[] = {
@@ -584,6 +590,7 @@ static struct gta01bl_machinfo backlight_machinfo = {
 	.default_intensity	= 1,
 	.max_intensity		= 1,
 	.limit_mask		= 1,
+	.defer_resume_backlight	= 1,
 };
 
 static struct resource gta01_bl_resources[] = {
diff --git a/drivers/video/backlight/gta01_bl.c b/drivers/video/backlight/gta01_bl.c
index 301ec9c..34c19c8 100644
--- a/drivers/video/backlight/gta01_bl.c
+++ b/drivers/video/backlight/gta01_bl.c
@@ -57,6 +57,8 @@ struct gta01bl_data {
 
 static struct gta01bl_data gta01bl;
 
+static int gta01bl_defer_resume_backlight;
+
 #define GTA01BL_SUSPENDED     0x01
 #define GTA01BL_BATTLOW       0x02
 
@@ -132,10 +134,12 @@ static int gta01bl_suspend(struct platform_device *dev, pm_message_t state)
 {
 	gta01bl_flags |= GTA01BL_SUSPENDED;
 	gta01bl_send_intensity(gta01_backlight_device);
+	neo1973_gpb_setpin(GTA01_GPIO_BACKLIGHT, 0);
+	s3c2410_gpio_cfgpin(GTA01_GPIO_BACKLIGHT, S3C2410_GPIO_OUTPUT);
 	return 0;
 }
 
-static int gta01bl_resume(struct platform_device *dev)
+void gta01bl_deferred_resume(void)
 {
 	mutex_lock(&gta01bl.mutex);
 	gta01bl_init_hw();
@@ -143,6 +147,13 @@ static int gta01bl_resume(struct platform_device *dev)
 
 	gta01bl_flags &= ~GTA01BL_SUSPENDED;
 	gta01bl_send_intensity(gta01_backlight_device);
+}
+EXPORT_SYMBOL_GPL(gta01bl_deferred_resume);
+
+static int gta01bl_resume(struct platform_device *dev)
+{
+	if (! gta01bl_defer_resume_backlight)
+		gta01bl_deferred_resume();
 	return 0;
 }
 #else
@@ -199,6 +210,8 @@ static int __init gta01bl_probe(struct platform_device *pdev)
 	if (!machinfo->limit_mask)
 		machinfo->limit_mask = -1;
 
+	gta01bl_defer_resume_backlight = machinfo->defer_resume_backlight;
+
 	gta01_backlight_device = backlight_device_register("gta01-bl",
 							   &pdev->dev, NULL,
 							   &gta01bl_ops);
diff --git a/include/asm-arm/arch-s3c2410/gta01.h b/include/asm-arm/arch-s3c2410/gta01.h
index 1cc2099..989aa55 100644
--- a/include/asm-arm/arch-s3c2410/gta01.h
+++ b/include/asm-arm/arch-s3c2410/gta01.h
@@ -12,10 +12,14 @@
 #define GTA01Bv4_SYSTEM_REV	0x00000240
 
 /* Backlight */
+
+extern void gta01bl_deferred_resume(void);
+
 struct gta01bl_machinfo {
 	unsigned int default_intensity;
 	unsigned int max_intensity;
 	unsigned int limit_mask;
+	unsigned int defer_resume_backlight;
 };
 
 /* Definitions common to all revisions */

-- 
linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko



More information about the pkg-fso-commits mailing list