[maemo-developers] [maemo-developers] Re: backlight

From: Frantisek Dufka dufkaf at seznam.cz
Date: Fri Jan 20 10:17:55 EET 2006
I hope the darkest level won't be too bright either. I see darker level 
when writing 1 via sysfs then it is possible via gui. When writing 2 it 
is same level as possible with GUI. But when writing 2 via sysfs it 
immediatelly returns 1 on read (and the brightness is same). I'll try 
the ioctl too. Thank you.

Frantisek

Arnaud Patard (Rtp) wrote:
> 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

More information about the maemo-developers mailing list