From: Pavel Machek <pavel@ucw.cz>
To: Bompart Cedric <cedric.bompart@thales-is.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
lenz@cs.wisc.edu, kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Hook collie frontlight into sysfs
Date: Fri, 31 Mar 2006 10:23:52 +0200 [thread overview]
Message-ID: <20060331082352.GF1663@elf.ucw.cz> (raw)
In-Reply-To: <6CE648B340455F479A7AE27769282663018A276F@gva0013.ch.intra>
Hi!
> During our test with Richard, we've been thinking can you implement the
> full range of brightness intensity values? For example for the others
> Zaurus, I think the range is between 0 and 63. So the userspace can
Well, I'm not sure if other values are "legal". They could damage
frontlight long-term or just eat too much power...
> adjust a wider range of levels for the backlight. Another thing, I
> didn't see anything different visually between the value 3 and 4.
You are right, the code to go brightness 4 is attached. It probably
needs to be converted to writel/readl...
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 8c53ebc..bcce028 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -1046,13 +1046,46 @@ void locomo_m62332_senddata(struct locom
* Frontlight control
*/
+#define LOCOMO_GPIO9 (1<<9)
+
+#ifdef DONE
+/* Should be same for collie and poodle */
+static int poodlefl_enable_accel(void)
+{
+ if (!(LOCOMO_GPO & LOCOMO_GPIO9)) {
+ LOCOMO_GPD &= ~LOCOMO_GPIO9;
+ LOCOMO_GPE &= ~LOCOMO_GPIO9;
+ LOCOMO_GPO |= LOCOMO_GPIO9;
+ }
+ return 0;
+}
+
+/* Should be same for collie and poodle */
+static int poodlefl_disable_accel(void)
+{
+ if (LOCOMO_GPO & LOCOMO_GPIO9) {
+ LOCOMO_GPD &= ~LOCOMO_GPIO9;
+ LOCOMO_GPE &= ~LOCOMO_GPIO9;
+ LOCOMO_GPO &= ~LOCOMO_GPIO9;
+ }
+ return 0;
+}
+#endif
+
static struct locomo *locomo_chip_driver(struct locomo_dev *ldev);
+#define LOCOMO_ALC_EN 0x8000
+
void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf)
{
unsigned long flags;
struct locomo *lchip = locomo_chip_driver(dev);
+#ifdef DONE
+ if (vr) poodlefl_enable_accel();
+ else poodlefl_disable_accel();
+#endif
+
spin_lock_irqsave(&lchip->lock, flags);
locomo_writel(bpwf, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS);
udelay(100);
Pavel
--
Picture of sleeping (Linux) penguin wanted...
next prev parent reply other threads:[~2006-03-31 8:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-31 7:29 Hook collie frontlight into sysfs Bompart Cedric
2006-03-31 8:23 ` Pavel Machek [this message]
2006-03-31 10:13 ` Richard Purdie
-- strict thread matches above, loose matches on Subject: below --
2006-03-30 11:46 Pavel Machek
2006-03-30 22:59 ` Richard Purdie
2006-03-30 23:30 ` 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=20060331082352.GF1663@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=cedric.bompart@thales-is.com \
--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