+ au1100fb-add-power-management-support.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     au1100fb: add power management support

has been added to the -mm tree.  Its filename is

     au1100fb-add-power-management-support.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: au1100fb: add power management support
From: Rodolfo Giometti <giometti@xxxxxxxx>


Add power management support

Signed-off-by: Rodolfo Giometti <giometti@xxxxxxxx>
Signed-off-by: Antonino Daplas <adaplas@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/video/au1100fb.c |   40 +++++++++++++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)

diff -puN drivers/video/au1100fb.c~au1100fb-add-power-management-support drivers/video/au1100fb.c
--- devel/drivers/video/au1100fb.c~au1100fb-add-power-management-support	2006-05-29 15:57:27.000000000 -0700
+++ devel-akpm/drivers/video/au1100fb.c	2006-05-29 15:57:27.000000000 -0700
@@ -7,6 +7,8 @@
  *  	Karl Lessard <klessard@xxxxxxxxxxxxxxxxxx>
  *  	<c.pellegrin@xxxxxxxxxxx>
  *
+ * PM support added by Rodolfo Giometti <giometti@xxxxxxxx>
+ *
  * Copyright 2002 MontaVista Software
  * Author: MontaVista Software, Inc.
  *		ppopov@xxxxxxxxxx or source@xxxxxxxxxx
@@ -602,17 +604,49 @@ int au1100fb_drv_remove(struct device *d
 	return 0;
 }
 
+#ifdef CONFIG_PM
+static u32 sys_clksrc;
+static struct au1100fb_regs fbregs;
+
 int au1100fb_drv_suspend(struct device *dev, pm_message_t state)
 {
-	/* TODO */
+	struct au1100fb_device *fbdev = dev_get_drvdata(dev);
+
+	if (!fbdev)
+		return 0;
+
+	/* Save the clock source state */
+	sys_clksrc = au_readl(SYS_CLKSRC);
+
+	/* Blank the LCD */
+	au1100fb_fb_blank(VESA_POWERDOWN, &fbdev->info);
+
+	/* Stop LCD clocking */
+	au_writel(sys_clksrc & ~SYS_CS_ML_MASK, SYS_CLKSRC);
+
+	memcpy(&fbregs, fbdev->regs, sizeof(struct au1100fb_regs));
+
 	return 0;
 }
 
 int au1100fb_drv_resume(struct device *dev)
 {
-	/* TODO */
+	struct au1100fb_device *fbdev = dev_get_drvdata(dev);
+
+	if (!fbdev)
+		return 0;
+
+	memcpy(fbdev->regs, &fbregs, sizeof(struct au1100fb_regs));
+
+	/* Restart LCD clocking */
+	au_writel(sys_clksrc, SYS_CLKSRC);
+
+	/* Unblank the LCD */
+	au1100fb_fb_blank(VESA_NO_BLANKING, &fbdev->info);
+
 	return 0;
 }
+#endif
 
 static struct device_driver au1100fb_driver = {
 	.name		= "au1100-lcd",
@@ -620,8 +654,10 @@ static struct device_driver au1100fb_dri
 
 	.probe		= au1100fb_drv_probe,
         .remove		= au1100fb_drv_remove,
+#ifdef CONFIG_PM
 	.suspend	= au1100fb_drv_suspend,
         .resume		= au1100fb_drv_resume,
+#endif
 };
 
 /*-------------------------------------------------------------------------*/
_

Patches currently in -mm which might be from giometti@xxxxxxxx are

au1100fb-fix-compilation.patch
au1100fb-add-power-management-support.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux