[maemo-developers] [maemo-developers] Re: brightness Re: [maemo-users] Re: Storage/Sleep Issues..

From: Frantisek Dufka dufkaf at seznam.cz
Date: Thu Jan 25 15:40:22 EET 2007
Karoliina.T.Salminen at nokia.com wrote:
> Hi,
>>>> Nothinig prevents you from creating a sysfs entry wich returns
>>>> tahvo_get_backlight_level()
>>>> or even a proc one, if you really are into that sort of thing.
>>> There is such entry - 
>>> /sys/devices/platform/omapfb/panel/backlight_level
> One related thing would interest me:
> - would it be possible to crank the level up further than the 127 the 
> number in /sys/devices/platform/omapfb/panel/backlight_level states when
> the
> display plugin has the maximum setting?

Not on kernel level and probably also not also directly on tahvo 
register access level.


static int tahvo_7bit_backlight;

int tahvo_get_backlight_level(void)
         int mask;

         if (tahvo_7bit_backlight)
                 mask = 0x7f;
                 mask = 0x0f;
         return tahvo_read_reg(TAHVO_REG_LEDPWMR) & mask;

int tahvo_get_max_backlight_level(void)
         if (tahvo_7bit_backlight)
                 return 0x7f;
                 return 0x0f;

void tahvo_set_backlight_level(int level)
         int max_level;

         max_level = tahvo_get_max_backlight_level();
         if (level > max_level)
                 level = max_level;
         tahvo_write_reg(TAHVO_REG_LEDPWMR, level);

More information about the maemo-developers mailing list