lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1334844594.62458.YahooMailClassic@web29011.mail.ird.yahoo.com>
Date:	Thu, 19 Apr 2012 15:09:54 +0100 (BST)
From:	Paul Parsons <lost.distance@...oo.com>
To:	FlorianSchandinat@....de
Cc:	mreimer@...systems.com, philipp.zabel@...il.com,
	linux-kernel@...r.kernel.org
Subject: [PATCH] video: w100fb: Reduce sleep mode battery discharge

In 2006 and 2007 the handhelds.org kernel w100fb driver was patched to
reduce sleep mode battery discharge. Unfortunately those two patches
never migrated to the mainline kernel.

Fortunately the function affected - w100_suspend() - has not changed
since; thus those patches still apply cleanly.

Applying those patches to linux-3.4-rc3 running on an HP iPAQ hx4700
reduces the sleep mode battery discharge from approximately 26 mA to
approximately 11 mA.

This patch combines those two patches into a single unified patch.

Signed-off-by: Paul Parsons <lost.distance@...oo.com>
Cc: Matt Reimer <mreimer@...systems.com>
Cc: Philipp Zabel <philipp.zabel@...il.com>
---

Many thanks to Matt Reimer for suggesting this.

The seeming demise of handhelds.org has removed any formal patch logs.
However the patches can still be viewed online:
2006 patch:
http://paste.lisp.org/display/31700
2007 patch:
http://osdir.com/ml/handhelds.linux.kernel/2007-02/msg00020.html

And the fully patched handhelds.org kernel is still available, e.g.:
http://www.linuxtogo.org/~goxboxlive/htcuniversal/Kernel/linux-2.6.21-hh20.tar.bz2

 drivers/video/w100fb.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
index 90a2e30..2f6b2b8 100644
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -1567,6 +1567,18 @@ static void w100_suspend(u32 mode)
 		val = readl(remapped_regs + mmPLL_CNTL);
 		val |= 0x00000004;  /* bit2=1 */
 		writel(val, remapped_regs + mmPLL_CNTL);
+
+		writel(0x00000000, remapped_regs + mmLCDD_CNTL1);
+		writel(0x00000000, remapped_regs + mmLCDD_CNTL2);
+		writel(0x00000000, remapped_regs + mmGENLCD_CNTL1);
+		writel(0x00000000, remapped_regs + mmGENLCD_CNTL2);
+		writel(0x00000000, remapped_regs + mmGENLCD_CNTL3);
+
+		val = readl(remapped_regs + mmMEM_EXT_CNTL);
+		val |= 0xF0000000;
+		val &= ~(0x00000001);
+		writel(val, remapped_regs + mmMEM_EXT_CNTL);
+
 		writel(0x0000001d, remapped_regs + mmPWRMGT_CNTL);
 	}
 }
-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ