* [patch] Support powering sharp zaurus sl-5500 LCD up and down
@ 2005-07-27 9:26 Pavel Machek
2005-07-27 9:37 ` Andrew Morton
0 siblings, 1 reply; 10+ messages in thread
From: Pavel Machek @ 2005-07-27 9:26 UTC (permalink / raw)
To: rpurdie, lenz, kernel list, Andrew Morton
This adds support for powering Zaurus's video up and down. PDA without
screen is kind of useless, so it is quite important... I'll have to
figure out how to really control the frontlight, because LCD without
that is quite hard to read.
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -3,3 +3,4 @@
obj-$(CONFIG_LCD_CLASS_DEVICE) += lcd.o
obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o
obj-$(CONFIG_BACKLIGHT_CORGI) += corgi_bl.o
+obj-$(CONFIG_SHARP_LOCOMO) += locomolcd.o
diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c
new file mode 100644
--- /dev/null
+++ b/drivers/video/backlight/locomolcd.c
@@ -0,0 +1,156 @@
+/*
+ * Backlight control code for Sharp Zaurus SL-5500
+ *
+ * Copyright 2005 John Lenz <lenz@cs.wisc.edu>
+ * GPL v2
+ *
+ */
+
+/* LCD power functions */
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/interrupt.h>
+
+#include <asm/hardware/locomo.h>
+#include <asm/irq.h>
+
+#ifdef CONFIG_SA1100_COLLIE
+#include <asm/arch/collie.h>
+#else
+#include <asm/arch/poodle.h>
+#endif
+
+extern void (*sa1100fb_lcd_power)(int on);
+
+static struct locomo_dev *locomolcd_dev = NULL;
+
+static void locomolcd_on(int comadj)
+{
+ locomo_gpio_set_dir(locomolcd_dev, LOCOMO_GPIO_LCD_VSHA_ON, 0);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VSHA_ON, 1);
+ mdelay(2);
+
+ locomo_gpio_set_dir(locomolcd_dev, LOCOMO_GPIO_LCD_VSHD_ON, 0);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VSHD_ON, 1);
+ mdelay(2);
+
+ locomo_m62332_senddata(locomolcd_dev, comadj, 0);
+ mdelay(5);
+
+ locomo_gpio_set_dir(locomolcd_dev, LOCOMO_GPIO_LCD_VEE_ON, 0);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VEE_ON, 1);
+ mdelay(10);
+
+ /* TFTCRST | CPSOUT=0 | CPSEN */
+ locomo_writel(0x01, locomolcd_dev->mapbase + LOCOMO_TC);
+
+ /* Set CPSD */
+ locomo_writel(6, locomolcd_dev->mapbase + LOCOMO_CPSD);
+
+ /* TFTCRST | CPSOUT=0 | CPSEN */
+ locomo_writel((0x04 | 0x01), locomolcd_dev->mapbase + LOCOMO_TC);
+ mdelay(10);
+
+ locomo_gpio_set_dir(locomolcd_dev, LOCOMO_GPIO_LCD_MOD, 0);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_MOD, 1);
+}
+
+static void locomolcd_off(int comadj)
+{
+ /* TFTCRST=1 | CPSOUT=1 | CPSEN = 0 */
+ locomo_writel(0x06, locomolcd_dev->mapbase + LOCOMO_TC);
+ mdelay(1);
+
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VSHA_ON, 0);
+ mdelay(110);
+
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VEE_ON, 0);
+ mdelay(700);
+
+ /* TFTCRST=0 | CPSOUT=0 | CPSEN = 0 */
+ locomo_writel(0, locomolcd_dev->mapbase + LOCOMO_TC);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_MOD, 0);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VSHD_ON, 0);
+}
+
+void locomolcd_power(int on)
+{
+ int comadj = 118;
+ unsigned long flags;
+
+ local_irq_save(flags);
+
+ if (!locomolcd_dev) {
+ local_irq_restore(flags);
+ return;
+ }
+
+ /* read comadj */
+#ifdef CONFIG_MACH_POODLE
+ comadj = 118;
+#else
+ comadj = 128;
+#endif
+
+ if (on)
+ locomolcd_on(comadj);
+ else
+ locomolcd_off(comadj);
+
+ local_irq_restore(flags);
+}
+EXPORT_SYMBOL(locomolcd_power);
+
+static int poodle_lcd_probe(struct locomo_dev *dev)
+{
+ unsigned long flags;
+
+ local_irq_save(flags);
+ locomolcd_dev = dev;
+
+ /* the poodle_lcd_power function is called for the first time
+ * from fs_initcall, which is before locomo is activated.
+ * We need to recall poodle_lcd_power here*/
+#ifdef CONFIG_MACH_POODLE
+ locomolcd_power(1);
+#endif
+ local_irq_restore(flags);
+ return 0;
+}
+
+static int poodle_lcd_remove(struct locomo_dev *dev)
+{
+ unsigned long flags;
+ local_irq_save(flags);
+ locomolcd_dev = NULL;
+ local_irq_restore(flags);
+ return 0;
+}
+
+static struct locomo_driver poodle_lcd_driver = {
+ .drv = {
+ .name = "locomo-backlight",
+ },
+ .devid = LOCOMO_DEVID_BACKLIGHT,
+ .probe = poodle_lcd_probe,
+ .remove = poodle_lcd_remove,
+};
+
+static int __init poodle_lcd_init(void)
+{
+ int ret;
+
+ ret = locomo_driver_register(&poodle_lcd_driver);
+ if (ret) return ret;
+
+#ifdef CONFIG_SA1100_COLLIE
+ sa1100fb_lcd_power = locomolcd_power;
+#endif
+
+ return 0;
+}
+device_initcall(poodle_lcd_init);
+
--
teflon -- maybe it is a trademark, but it should not be.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [patch] Support powering sharp zaurus sl-5500 LCD up and down
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 9:53 ` Pavel Machek
0 siblings, 2 replies; 10+ messages in thread
From: Andrew Morton @ 2005-07-27 9:37 UTC (permalink / raw)
To: Pavel Machek; +Cc: rpurdie, lenz, linux-kernel
Pavel Machek <pavel@ucw.cz> wrote:
>
> This adds support for powering Zaurus's video up and down.
I assume you have a new toy ;)
> PDA without
> screen is kind of useless, so it is quite important... I'll have to
> figure out how to really control the frontlight, because LCD without
> that is quite hard to read.
signed-off-by?
> @@ -0,0 +1,156 @@
> +/*
> + * Backlight control code for Sharp Zaurus SL-5500
> + *
> + * Copyright 2005 John Lenz <lenz@cs.wisc.edu>
> + * GPL v2
Who is the maintainer for this stuff?
> +static struct locomo_dev *locomolcd_dev = NULL;
bah.
> +void locomolcd_power(int on)
> +{
> + int comadj = 118;
> + unsigned long flags;
> +
> + local_irq_save(flags);
What strange locking this driver uses. It appears to be assuming
uniprocessor, yes?
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [patch] Support powering sharp zaurus sl-5500 LCD up and down
2005-07-27 9:37 ` Andrew Morton
@ 2005-07-27 9:50 ` Pavel Machek
2005-07-27 10:00 ` Andrew Morton
2005-07-27 9:53 ` Pavel Machek
1 sibling, 1 reply; 10+ messages in thread
From: Pavel Machek @ 2005-07-27 9:50 UTC (permalink / raw)
To: Andrew Morton; +Cc: rpurdie, lenz, linux-kernel
Hi!
> > This adds support for powering Zaurus's video up and down.
>
> I assume you have a new toy ;)
Actually very old toy, but I decided to make it working with 2.6
kernel (needed for bluetooth). Which is not quite an easy task.
> > PDA without
> > screen is kind of useless, so it is quite important... I'll have to
> > figure out how to really control the frontlight, because LCD without
> > that is quite hard to read.
>
> signed-off-by?
Sorry, will add.
> > @@ -0,0 +1,156 @@
> > +/*
> > + * Backlight control code for Sharp Zaurus SL-5500
> > + *
> > + * Copyright 2005 John Lenz <lenz@cs.wisc.edu>
> > + * GPL v2
>
> Who is the maintainer for this stuff?
I guess I'll maintain in.
> > +static struct locomo_dev *locomolcd_dev = NULL;
>
> bah.
Well, sa1100fb_lcd_power is not provide us with void * we could use,
and by definition you only have one frontlight in a PDA, so that
should be okay...
> > +void locomolcd_power(int on)
> > +{
> > + int comadj = 118;
> > + unsigned long flags;
> > +
> > + local_irq_save(flags);
>
> What strange locking this driver uses. It appears to be assuming
> uniprocessor, yes?
Yes, and I guess that's okay: collie is slightly old hardware, and
noone is going to retrofit second CPU to old PDA.
Pavel
--
teflon -- maybe it is a trademark, but it should not be.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [patch] Support powering sharp zaurus sl-5500 LCD up and down
2005-07-27 9:50 ` Pavel Machek
@ 2005-07-27 10:00 ` Andrew Morton
2005-07-27 10:05 ` Pavel Machek
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2005-07-27 10:00 UTC (permalink / raw)
To: Pavel Machek; +Cc: rpurdie, lenz, linux-kernel
Pavel Machek <pavel@ucw.cz> wrote:
>
> Hi!
>
> > > This adds support for powering Zaurus's video up and down.
> >
> > I assume you have a new toy ;)
>
> Actually very old toy, but I decided to make it working with 2.6
> kernel (needed for bluetooth). Which is not quite an easy task.
>
> > > PDA without
> > > screen is kind of useless, so it is quite important... I'll have to
> > > figure out how to really control the frontlight, because LCD without
> > > that is quite hard to read.
> >
> > signed-off-by?
>
> Sorry, will add.
I'll do it.
> > > @@ -0,0 +1,156 @@
> > > +/*
> > > + * Backlight control code for Sharp Zaurus SL-5500
> > > + *
> > > + * Copyright 2005 John Lenz <lenz@cs.wisc.edu>
> > > + * GPL v2
> >
> > Who is the maintainer for this stuff?
>
> I guess I'll maintain in.
>
> > > +static struct locomo_dev *locomolcd_dev = NULL;
> >
> > bah.
>
> Well, sa1100fb_lcd_power is not provide us with void * we could use,
> and by definition you only have one frontlight in a PDA, so that
> should be okay...
"bah" means "there's no need to initialise this to NULL".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] Support powering sharp zaurus sl-5500 LCD up and down
2005-07-27 10:00 ` Andrew Morton
@ 2005-07-27 10:05 ` Pavel Machek
0 siblings, 0 replies; 10+ messages in thread
From: Pavel Machek @ 2005-07-27 10:05 UTC (permalink / raw)
To: Andrew Morton; +Cc: rpurdie, lenz, linux-kernel
Hi!
> > > > +/*
> > > > + * Backlight control code for Sharp Zaurus SL-5500
> > > > + *
> > > > + * Copyright 2005 John Lenz <lenz@cs.wisc.edu>
> > > > + * GPL v2
> > >
> > > Who is the maintainer for this stuff?
> >
> > I guess I'll maintain in.
> >
> > > > +static struct locomo_dev *locomolcd_dev = NULL;
> > >
> > > bah.
> >
> > Well, sa1100fb_lcd_power is not provide us with void * we could use,
> > and by definition you only have one frontlight in a PDA, so that
> > should be okay...
>
> "bah" means "there's no need to initialise this to NULL".
Okay, that's kind of easier to fix ;-). Done here, it will eventually
propagate.
Pavel
--
teflon -- maybe it is a trademark, but it should not be.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch] Support powering sharp zaurus sl-5500 LCD up and down
2005-07-27 9:37 ` Andrew Morton
2005-07-27 9:50 ` Pavel Machek
@ 2005-07-27 9:53 ` Pavel Machek
2005-07-27 10:06 ` Richard Purdie
1 sibling, 1 reply; 10+ messages in thread
From: Pavel Machek @ 2005-07-27 9:53 UTC (permalink / raw)
To: Andrew Morton; +Cc: rpurdie, lenz, linux-kernel
This adds support for powering Zaurus's video up and down. PDA
without screen is kind of useless, so it is quite important... I'll
have to figure out how to really control the frontlight, because LCD
without that is quite hard to read.
Signed-off-by: Pavel Machek <pavel@suse.cz>
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -3,3 +3,4 @@
obj-$(CONFIG_LCD_CLASS_DEVICE) += lcd.o
obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o
obj-$(CONFIG_BACKLIGHT_CORGI) += corgi_bl.o
+obj-$(CONFIG_SHARP_LOCOMO) += locomolcd.o
diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c
new file mode 100644
--- /dev/null
+++ b/drivers/video/backlight/locomolcd.c
@@ -0,0 +1,157 @@
+/*
+ * Backlight control code for Sharp Zaurus SL-5500
+ *
+ * Copyright 2005 John Lenz <lenz@cs.wisc.edu>
+ * Maintainer: Pavel Machek <pavel@suse.cz> (unless John wants to :-)
+ * GPL v2
+ *
+ * This driver assumes single CPU. That's okay, because collie is
+ * slightly old hardware, and noone is going to retrofit second CPU to
+ * old PDA.
+ */
+
+/* LCD power functions */
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/interrupt.h>
+
+#include <asm/hardware/locomo.h>
+#include <asm/irq.h>
+
+#ifdef CONFIG_SA1100_COLLIE
+#include <asm/arch/collie.h>
+#else
+#include <asm/arch/poodle.h>
+#endif
+
+extern void (*sa1100fb_lcd_power)(int on);
+
+static struct locomo_dev *locomolcd_dev = NULL;
+
+static void locomolcd_on(int comadj)
+{
+ locomo_gpio_set_dir(locomolcd_dev, LOCOMO_GPIO_LCD_VSHA_ON, 0);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VSHA_ON, 1);
+ mdelay(2);
+
+ locomo_gpio_set_dir(locomolcd_dev, LOCOMO_GPIO_LCD_VSHD_ON, 0);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VSHD_ON, 1);
+ mdelay(2);
+
+ locomo_m62332_senddata(locomolcd_dev, comadj, 0);
+ mdelay(5);
+
+ locomo_gpio_set_dir(locomolcd_dev, LOCOMO_GPIO_LCD_VEE_ON, 0);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VEE_ON, 1);
+ mdelay(10);
+
+ /* TFTCRST | CPSOUT=0 | CPSEN */
+ locomo_writel(0x01, locomolcd_dev->mapbase + LOCOMO_TC);
+
+ /* Set CPSD */
+ locomo_writel(6, locomolcd_dev->mapbase + LOCOMO_CPSD);
+
+ /* TFTCRST | CPSOUT=0 | CPSEN */
+ locomo_writel((0x04 | 0x01), locomolcd_dev->mapbase + LOCOMO_TC);
+ mdelay(10);
+
+ locomo_gpio_set_dir(locomolcd_dev, LOCOMO_GPIO_LCD_MOD, 0);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_MOD, 1);
+}
+
+static void locomolcd_off(int comadj)
+{
+ /* TFTCRST=1 | CPSOUT=1 | CPSEN = 0 */
+ locomo_writel(0x06, locomolcd_dev->mapbase + LOCOMO_TC);
+ mdelay(1);
+
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VSHA_ON, 0);
+ mdelay(110);
+
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VEE_ON, 0);
+ mdelay(700);
+
+ /* TFTCRST=0 | CPSOUT=0 | CPSEN = 0 */
+ locomo_writel(0, locomolcd_dev->mapbase + LOCOMO_TC);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_MOD, 0);
+ locomo_gpio_write(locomolcd_dev, LOCOMO_GPIO_LCD_VSHD_ON, 0);
+}
+
+void locomolcd_power(int on)
+{
+ int comadj = 118;
+ unsigned long flags;
+
+ local_irq_save(flags);
+
+ if (!locomolcd_dev) {
+ local_irq_restore(flags);
+ return;
+ }
+
+ /* read comadj */
+#ifdef CONFIG_MACH_POODLE
+ comadj = 118;
+#else
+ comadj = 128;
+#endif
+
+ if (on)
+ locomolcd_on(comadj);
+ else
+ locomolcd_off(comadj);
+
+ local_irq_restore(flags);
+}
+EXPORT_SYMBOL(locomolcd_power);
+
+static int poodle_lcd_probe(struct locomo_dev *dev)
+{
+ unsigned long flags;
+
+ local_irq_save(flags);
+ locomolcd_dev = dev;
+
+ /* the poodle_lcd_power function is called for the first time
+ * from fs_initcall, which is before locomo is activated.
+ * We need to recall poodle_lcd_power here*/
+#ifdef CONFIG_MACH_POODLE
+ locomolcd_power(1);
+#endif
+ local_irq_restore(flags);
+ return 0;
+}
+
+static int poodle_lcd_remove(struct locomo_dev *dev)
+{
+ unsigned long flags;
+ local_irq_save(flags);
+ locomolcd_dev = NULL;
+ local_irq_restore(flags);
+ return 0;
+}
+
+static struct locomo_driver poodle_lcd_driver = {
+ .drv = {
+ .name = "locomo-backlight",
+ },
+ .devid = LOCOMO_DEVID_BACKLIGHT,
+ .probe = poodle_lcd_probe,
+ .remove = poodle_lcd_remove,
+};
+
+static int __init poodle_lcd_init(void)
+{
+ int ret = locomo_driver_register(&poodle_lcd_driver);
+ if (ret) return ret;
+
+#ifdef CONFIG_SA1100_COLLIE
+ sa1100fb_lcd_power = locomolcd_power;
+#endif
+ return 0;
+}
+device_initcall(poodle_lcd_init);
+
--
teflon -- maybe it is a trademark, but it should not be.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [patch] Support powering sharp zaurus sl-5500 LCD up and down
2005-07-27 9:53 ` Pavel Machek
@ 2005-07-27 10:06 ` Richard Purdie
2005-07-30 13:07 ` Pavel Machek
2005-08-01 21:23 ` John Lenz
0 siblings, 2 replies; 10+ messages in thread
From: Richard Purdie @ 2005-07-27 10:06 UTC (permalink / raw)
To: Pavel Machek; +Cc: Andrew Morton, lenz, linux-kernel
On Wed, 2005-07-27 at 11:53 +0200, Pavel Machek wrote:
> + /* 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 :).
Thanks,
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] Support powering sharp zaurus sl-5500 LCD up and down
2005-07-27 10:06 ` Richard Purdie
@ 2005-07-30 13:07 ` Pavel Machek
2005-08-01 21:23 ` John Lenz
1 sibling, 0 replies; 10+ messages in thread
From: Pavel Machek @ 2005-07-30 13:07 UTC (permalink / raw)
To: Richard Purdie; +Cc: lenz, linux-kernel
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.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [patch] Support powering sharp zaurus sl-5500 LCD up and down
2005-07-27 10:06 ` Richard Purdie
2005-07-30 13:07 ` Pavel Machek
@ 2005-08-01 21:23 ` John Lenz
2005-08-01 22:14 ` Pavel Machek
1 sibling, 1 reply; 10+ messages in thread
From: John Lenz @ 2005-08-01 21:23 UTC (permalink / raw)
To: Richard Purdie; +Cc: Pavel Machek, Andrew Morton, linux-kernel
On Wed, July 27, 2005 5:06 am, Richard Purdie said:
> On Wed, 2005-07-27 at 11:53 +0200, Pavel Machek wrote:
>> + /* 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 :).
No, those values were from the original sharp code... at some point I was
going to investigate what values the sharpsl param stuff returned and see
if those worked. If the sharpsl stuff works, then by all means use it.
John
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] Support powering sharp zaurus sl-5500 LCD up and down
2005-08-01 21:23 ` John Lenz
@ 2005-08-01 22:14 ` Pavel Machek
0 siblings, 0 replies; 10+ messages in thread
From: Pavel Machek @ 2005-08-01 22:14 UTC (permalink / raw)
To: John Lenz; +Cc: Richard Purdie, Andrew Morton, linux-kernel
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 :).
>
> No, those values were from the original sharp code... at some point I was
> going to investigate what values the sharpsl param stuff returned and see
> if those worked. If the sharpsl stuff works, then by all means use it.
I added code to read it from sharpsl, if it is not there, I use
defaults above. It seems to work on my collie.
Pavel
--
teflon -- maybe it is a trademark, but it should not be.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-08-01 22:19 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2005-08-01 21:23 ` John Lenz
2005-08-01 22:14 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox