linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
To: Paul Parsons <lost.distance@yahoo.com>
Cc: mreimer@sdgsystems.com, philipp.zabel@gmail.com,
	linux-kernel@vger.kernel.org,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>
Subject: Re: [PATCH RESEND] video: w100fb: Reduce sleep mode battery discharge
Date: Sun, 08 Jul 2012 22:01:48 +0000	[thread overview]
Message-ID: <4FFA034C.7000105@gmx.de> (raw)
In-Reply-To: <20120603103355.3845gmx1@mx072.gmx.net>

On 06/03/2012 10:33 AM, Paul Parsons wrote:
> 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@yahoo.com>
> Cc: Matt Reimer <mreimer@sdgsystems.com>
> Cc: Philipp Zabel <philipp.zabel@gmail.com>

Applied.


Thanks,

Florian Tobias Schandinat

> ---
> 
> 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);
>  	}
>  }


      parent reply	other threads:[~2012-07-08 22:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120603103355.3845gmx1@mx072.gmx.net>
2012-06-24 21:24 ` [PATCH RESEND] video: w100fb: Reduce sleep mode battery discharge Florian Tobias Schandinat
2012-07-08 22:01 ` Florian Tobias Schandinat [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FFA034C.7000105@gmx.de \
    --to=florianschandinat@gmx.de \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lost.distance@yahoo.com \
    --cc=mreimer@sdgsystems.com \
    --cc=philipp.zabel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).