public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Richard Purdie <rpurdie@rpsys.net>
Cc: lenz@cs.wisc.edu, linux-kernel@vger.kernel.org
Subject: Re: [patch] Support powering sharp zaurus sl-5500 LCD up and down
Date: Sat, 30 Jul 2005 15:07:01 +0200	[thread overview]
Message-ID: <20050730130701.GD1830@elf.ucw.cz> (raw)
In-Reply-To: <1122458769.7773.39.camel@localhost.localdomain>

Hi!

> > +	/* read comadj */
> > +#ifdef CONFIG_MACH_POODLE
> > +	comadj = 118;
> > +#else
> > +	comadj = 128;
> > +#endif
> 
> Can you go back to the Sharp source and confirm that these values should
> be hardcoded in both the poodle and collie cases please? I know the
> sharpsl_param code can provide them but I can't remember exactly which
> models use which fields. I want to make sure this isn't a quick hack
> John made before sharpsl_param was written :).

Sharp sources are a big mess (as usual), but reading it from
sharpsl_param seems to be okay for at least poodle. I'll read it for
collie, too, and see what happens... seems to work.

[Not for andrew, yet.]
								Pavel


diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c
--- a/drivers/video/backlight/locomolcd.c
+++ b/drivers/video/backlight/locomolcd.c
@@ -20,6 +20,7 @@
 
 #include <asm/hardware/locomo.h>
 #include <asm/irq.h>
+#include <asm/mach/sharpsl_param.h>
 
 #ifdef CONFIG_SA1100_COLLIE
 #include <asm/arch/collie.h>
@@ -29,7 +30,7 @@
 
 extern void (*sa1100fb_lcd_power)(int on);
 
-static struct locomo_dev *locomolcd_dev = NULL;
+static struct locomo_dev *locomolcd_dev;
 
 static void locomolcd_on(int comadj)
 {
@@ -82,7 +83,7 @@ static void locomolcd_off(int comadj)
 
 void locomolcd_power(int on)
 {
-	int comadj = 118;
+	int comadj = sharpsl_param.comadj;
 	unsigned long flags;
 	
 	local_irq_save(flags);
@@ -93,11 +94,13 @@ void locomolcd_power(int on)
 	}
 
 	/* read comadj */
+	if (comadj == -1) {
 #ifdef CONFIG_MACH_POODLE
-	comadj = 118;
+		comadj = 118;
 #else
-	comadj = 128;
+		comadj = 128;
 #endif
+	}
 
 	if (on)
 		locomolcd_on(comadj);

-- 
teflon -- maybe it is a trademark, but it should not be.

  reply	other threads:[~2005-07-30 13:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-27  9:26 [patch] Support powering sharp zaurus sl-5500 LCD up and down Pavel Machek
2005-07-27  9:37 ` Andrew Morton
2005-07-27  9:50   ` Pavel Machek
2005-07-27 10:00     ` Andrew Morton
2005-07-27 10:05       ` Pavel Machek
2005-07-27  9:53   ` Pavel Machek
2005-07-27 10:06     ` Richard Purdie
2005-07-30 13:07       ` Pavel Machek [this message]
2005-08-01 21:23       ` John Lenz
2005-08-01 22:14         ` Pavel Machek

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=20050730130701.GD1830@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=lenz@cs.wisc.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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