>-----Original Message-----
>From:
android...@googlegroups.com [mailto:
android-
>
ker...@googlegroups.com] On Behalf Of Xiaoyang Yu (Max)
>Sent: Thursday, February 05, 2009 10:34 PM
>To: Android Linux Kernel Development
>Subject: [android-kernel] question about sysfs interface for backlight
>adjustment
>
>
>Android assumes the sysfs interface for backlight adjustment is at "/
>sys/class/leds/lcd-backlight/brightness", which is not true for EeePC.
>EeePC uses "/sys/class/backlight/eeepc/brightness". And other
>platforms may use "/sys/class/backlight/acpi_video0/brightness".
>
>Also Android assuems the backlight value change from 30..255. While it
>should be 0..15 for EeePC, and 0..7 for other platforms. The maximum
>backlight value can be read from "/sys/class/backlight/eeepc/
>max_brightness" or "/sys/class/backlight/acpi_video0/max_brightness".
>
>So should we change Android kernel's sysfs interface? For example,
>Android kernel create a symbol link "default" in "/sys/class/
>backlight", and make it link to "eeepc" or "acpi_video0". Or create "/
>sys/class/leds/lcd-backlight" as a symbol link to "/sys/class/
>backlight/eeepc" or "/sys/class/backlight/acpi_video0".
>
>Or should we not change kernel, but only change the userspace code,
>like scan the directory "/sys/class/backlight" to see which sub-
>directory in it?
>
It looks to me that the android kernel using /sys/class/leds/lcd-backlight is not consistent with existing backlight sysfs interfaces and should be changed to /sys/class/backlight/... .
Additionally some introspection of the backlight range should be available from the sysfs interface and used by the user mode code to deal with the differing ranges. User mode should not assume kernel details like valid ranges for brightness.