Brad Midgley <[EMAIL PROTECTED]> writes: > Arnaud > > The strange thing is that when you're on the lowest level the gui will > allow (1), the display goes a little dimmer than that when idle and the > sys file actually reports the value 0. But if you *write* a 0 to the sys > file, the backlight turns off altogether. > > This leaves two interpretations for a 0 value.
after looking at the kernel sources, you have 2 ways of setting the PWM value for the backlight : - through sysfs - through /dev/tavho with an ioctl (look at the tahvo-user.c and tahvo.h files in the kernel). If you use the first method, you're have to cope with a scale factor eg when you write 1, you'll write 1*0x7f/0x0f=0x08. This is also happening when you read the file. If you use the second method, you may write an arbitrary value for the pwm. This is probably how is working the gui. This is why 1 with the gui is not the same 1 as with sysfs. If you try to set the level with the ioctl, to something like 1, you'll get a darker screen as expected but it'll go a few sec later to the gui setting. I hope that this helps you :) Arnaud > > Brad > >>>Looks like it can be controlled via ioctl on the framebuffer device. >>>http://maemo.org/lxr/source/osso-af-utils/src/omapfb.h >>> >>>struct lcd_panel has pointer >>>int (*set_bklight_level)(struct lcd_panel *panel,unsigned int level); >>> >>>I'll try to figure out how it can be called. If anyone knows, don't >>>hesitate to answer :) >> >> >> well, you can call it by echoing to >> /sys/bus/platform/devices/omapfb/panel/backlight_level >> >> In reality, the function called is lph8923_panel_set_bklight_level() in >> lcd_lph8923.c (which in turn calls tahvo_set_backlight_level). The code >> is saying that 1 is the lowest value (except 0 :P) and 15 the highest. >> >> So, you can't go lower unless there's an other way to play with the >> level. >> >> >> Arnaud >> >> >> >>>Frantisek >>> >>>Brad Midgley wrote: >>> >>>>Frantisek >>>>I noticed this too, but we know it can go lower... the backlight goes >>>>just a bit lower when you're idle and before it turns off altogether. >>>>Brad >>>> >>> >>>_______________________________________________ >>>maemo-developers mailing list >>>maemo-developers@maemo.org >>>https://maemo.org/mailman/listinfo/maemo-developers >> >> _______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers