Messages in this thread Patch in this message | | | Date | Sat, 30 Jul 2005 15:07:01 +0200 | From | Pavel Machek <> | Subject | Re: [patch] Support powering sharp zaurus sl-5500 LCD up and down |
| |
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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |