Commit fb181559 authored by Paul Parsons's avatar Paul Parsons Committed by Florian Tobias Schandinat

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: default avatarPaul Parsons <lost.distance@yahoo.com>
Cc: Matt Reimer <mreimer@sdgsystems.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
parent d65c8f31
...@@ -1567,6 +1567,18 @@ static void w100_suspend(u32 mode) ...@@ -1567,6 +1567,18 @@ static void w100_suspend(u32 mode)
val = readl(remapped_regs + mmPLL_CNTL); val = readl(remapped_regs + mmPLL_CNTL);
val |= 0x00000004; /* bit2=1 */ val |= 0x00000004; /* bit2=1 */
writel(val, remapped_regs + mmPLL_CNTL); 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); writel(0x0000001d, remapped_regs + mmPWRMGT_CNTL);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment