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...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]