Skip to contentSkip to conversation

Illuminated keyboard on ASUS U50VG laptop, backlight or led ?

DISCUSSION Corentin Chary 5 participants 19 messages Jul 24, 2009 – Dec 7, 2009 ACPI

lore
Share & tools
lore
#0 lore raw

Hi,
I'm working on Illimunated keyboard for some new Asus U50VG, There is some kind of backlight for the keyboard:
http://forum.amtech.com.vn/attachments/reviews-zone/16272d1245751662-laptop-asus-u50vg-con-sot-moi-cua-asus-p1010643.jpg
There is 4 level of brightness.

I've found the ACPI to control that, but I'm not sure if I should register it as a led or as a backlight.

Any Idea ?

Thanks

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net - http://uffs.org
#1 lore raw
Quoted 6 lines · Corentin Chary

Hi,
I'm working on Illimunated keyboard for some new Asus U50VG, There is some kind of backlight for the keyboard:
http://forum.amtech.com.vn/attachments/reviews-zone/16272d1245751662-laptop-asus-u50vg-con-sot-moi-cua-asus-p1010643.jpg
There is 4 level of brightness.

Quoted 6 lines

I've found the ACPI to control that, but I'm not sure if I should register it as a led or as a backlight.

Any Idea ?

Thanks

No answers.
I think I'll implement that as a backlight, because it is a backlight even if it's not for a screen.

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net - http://uffs.org
#2 lore raw
Quoted 3 lines · Corentin Chary

No answers.
I think I'll implement that as a backlight, because it is a backlight even if it's not for a screen.

I believe the SMC driver for the Apples does it via LED, so it might make sense to be consistent with that.

Signature · 1 line
Matthew Garrett | [email protected]
#3 lore raw
Quoted 6 lines · Matthew Garrett
Quoted 3 lines · Corentin Chary

No answers.
I think I'll implement that as a backlight, because it is a backlight even if it's not for a screen.

Quoted 6 lines

I believe the SMC driver for the Apples does it via LED, so it might make sense to be consistent with that.

--
Matthew Garrett | [email protected]

So it will be a led.
There is another problem, Fn+F3/F4 generate ACPI events

Fn+F3 : hotkey ATKD 000000c5 00000000
Fn+F4 : hotkey ATKD 000000c4 00000000

Fn+F3: decreases keyboard brightness
Fn+F4: increases keyboard brightness

Should we handle these events with acpi scripts or directly in the driver ? IMHO it can be done directly in the driver, like LCD On/Off keys.

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net - http://uffs.org
#4 lore raw
Quoted 12 lines · Corentin Chary
Quoted 10 lines · Matthew Garrett
Quoted 4 lines · Corentin Chary

No answers.
I think I'll implement that as a backlight, because it is a backlight even if it's not for a screen.

I believe the SMC driver for the Apples does it via LED, so it might make sense to be consistent with that.

Quoted 7 lines
Quoted 4 lines

--
Matthew Garrett | [email protected]

So it will be a led.

I think you should also match the LED name used by the apple driver. As far as I know it's the only sensible way for userspace to identify the LED. The SMC driver uses "smc::kbd_backlight", so something like "eeepc::kbd_backlight".

Quoted 11 lines

There is another problem, Fn+F3/F4 generate ACPI events

Fn+F3 : hotkey ATKD 000000c5 00000000
Fn+F4 : hotkey ATKD 000000c4 00000000

Fn+F3: decreases keyboard brightness
Fn+F4: increases keyboard brightness

Should we handle these events with acpi scripts or directly in the driver ? IMHO it can be done directly in the driver, like LCD On/Off keys.

Here's my opinion based on no experience and 10 minutes with google :-).

Userspace should take charge of changing the brightness. It would be good to generate input events (KEY_KBDILLUMUP etc) as well though.

Hopefully hald-addon-generic-kbd-backlight already responds to KEY_KBDILLUM*. If so, then one could use Hal along with an FDI file like the apple one
(<http://lists.freedesktop.org/archives/hal/2008-October/012360.html>).
That's close to what we should ultimately be aiming for, except for the specific match on "smc::kbd_backlight". It would be great to just have one rule matching on *::kbd_backlight.

Alan

#5 lore raw
Quoted 8 lines · Alan Jenkins
Quoted 7 lines · Corentin Chary
Quoted 5 lines · Matthew Garrett

I believe the SMC driver for the Apples does it via LED, so it might make sense to be consistent with that.

--
Matthew Garrett | [email protected]

Quoted 6 lines
Quoted 1 line

So it will be a led.

I think you should also match the LED name used by the apple driver.  As far as I know it's the only sensible way for userspace to identify the LED.  The SMC driver uses "smc::kbd_backlight",  so something like "eeepc::kbd_backlight".

Not an eeepc, but yeah, it will be asus::kbd_backlight

Quoted 15 lines
Quoted 11 lines

There is another problem, Fn+F3/F4 generate ACPI events

Fn+F3 : hotkey ATKD 000000c5 00000000
Fn+F4 : hotkey ATKD 000000c4 00000000

Fn+F3: decreases keyboard brightness
Fn+F4: increases keyboard brightness

Should we handle these events with acpi scripts or directly in the driver ? IMHO it can be done directly in the driver, like LCD On/Off keys.

Userspace should take charge of changing the brightness.  It would be good to generate input events (KEY_KBDILLUMUP etc) as well though.

Quoted 7 lines

Hopefully hald-addon-generic-kbd-backlight already responds to KEY_KBDILLUM*.  If so, then one could use Hal along with an FDI file like the apple one
(<http://lists.freedesktop.org/archives/hal/2008-October/012360.html>).
That's close to what we should ultimately be aiming for, except for the specific match on "smc::kbd_backlight".  It would be great to just have one rule matching on *::kbd_backlight.

Maybe just *:kbd_backlight . The naming scheme is vendor:color:name The problem is that hald-addon-generic-kbd-backlight is not merged upstream.

So, hal mailing list is now CC'ed
Is there any plan to merge hald-addon-generic-kbd-backlight ? Patch can be found here:
http://lists.freedesktop.org/archives/hal/2008-October/012361.html

Thanks,

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net - http://uffs.org
#6 lore raw
Quoted 8 lines · Corentin Chary

Maybe just *:kbd_backlight . The naming scheme is vendor:color:name The problem is that hald-addon-generic-kbd-backlight is not merged upstream.

So, hal mailing list is now CC'ed
Is there any plan to merge hald-addon-generic-kbd-backlight ? Patch can be found here:
http://lists.freedesktop.org/archives/hal/2008-October/012361.html

This patch is not needed. There is a generic addon for the leds subsystem in HAL.

Check out:
http://people.freedesktop.org/~dkukawka/hal-spec-git/hal-spec.html#interface-device-leds

If there is any problem with this addon, let me know.

Danny

#7 lore raw
Quoted 13 lines · Danny Kukawka
Quoted 8 lines · Corentin Chary

Maybe just *:kbd_backlight . The naming scheme is vendor:color:name The problem is that hald-addon-generic-kbd-backlight is not merged upstream.

So, hal mailing list is now CC'ed
Is there any plan to merge hald-addon-generic-kbd-backlight ? Patch can be found here:
http://lists.freedesktop.org/archives/hal/2008-October/012361.html

This patch is not needed. There is a generic addon for the leds subsystem in HAL.

Quoted 6 lines

Check out:
http://people.freedesktop.org/~dkukawka/hal-spec-git/hal-spec.html#interface-device-leds

If there is any problem with this addon, let me know.

Danny

It seems there is also a KeyboardBacklight interface which is what we want, but I didn't find how to use it
without an addon (like addon-macbookpro-backlight).

Summary of the thread:
Asus U50 provide a keyboard backlight, I didn't know how to expose that to userspace.
Matthew told me that in Apples, the SMC driver expose the keyboard backlight as a led.
Then Alan found hald-addon-generic-kbd-backlight to plug the led subsystem and org.freedesktop.Hal.Device.KeyboardBacklight interface.

What we want to do is change the brightness when KEY_KBDILLUM* is pressed.

I believe that we need a keyboard backlight addon that respond to KEY_KBDILLUM* and update the corresponding /sys/class/vendor:color:kbd_backlight.

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net - http://uffs.org
#8 lore raw
Quoted 18 lines · Corentin Chary
Quoted 17 lines · Danny Kukawka
Quoted 8 lines · Corentin Chary

Maybe just *:kbd_backlight . The naming scheme is vendor:color:name The problem is that hald-addon-generic-kbd-backlight is not merged upstream.

So, hal mailing list is now CC'ed
Is there any plan to merge hald-addon-generic-kbd-backlight ? Patch can be found here:
http://lists.freedesktop.org/archives/hal/2008-October/012361.html

This patch is not needed. There is a generic addon for the leds subsystem in
HAL.

Check out:
http://people.freedesktop.org/~dkukawka/hal-spec-git/hal-spec.html#interface-device-leds

Quoted 7 lines
Quoted 3 lines

If there is any problem with this addon, let me know.

Danny

It seems there is also a KeyboardBacklight interface which is what we want, but I didn't find how to use it
without an addon (like addon-macbookpro-backlight).

But if you look at the methods, they are exactly the same, right? I think the idea is to use an FDI file to match our LED device (or possibly create it as a hal device... I'm still really fuzzy on hal), and then mark it as having the "keyboard_backlight" capability.

Quoted 9 lines

Summary of the thread:
Asus U50 provide a keyboard backlight, I didn't know how to expose that to userspace.
Matthew told me that in Apples, the SMC driver expose the keyboard backlight as a led.
Then Alan found hald-addon-generic-kbd-backlight to plug the led subsystem and
org.freedesktop.Hal.Device.KeyboardBacklight interface.

Quoted 5 lines

What we want to do is change the brightness when KEY_KBDILLUM* is pressed.

I believe that we need a keyboard backlight addon that respond to KEY_KBDILLUM*
and update the corresponding /sys/class/vendor:color:kbd_backlight.

Oops, thats not the addons job. It's for something like the gnome power manager. It looks like g-p-m already picks up the device with a "keyboard_backlight" capability, and react to keyboard brightness key events.

Regards
Alan

#9 lore raw
Quoted 1 line · Alan Jenkins

On 8/1/09, Corentin Chary <[email protected]> wrote:

[...]

Quoted 6 lines
Quoted 4 lines

It seems there is also a KeyboardBacklight interface which is what we want, but I didn't find how to use it
without an addon (like addon-macbookpro-backlight).

But if you look at the methods, they are exactly the same, right?

Yes, they are.

Quoted 4 lines

I
think the idea is to use an FDI file to match our LED device (or possibly create it as a hal device... I'm still really fuzzy on hal), and then mark it as having the "keyboard_backlight" capability.

No, it wouldn't work this way. At least not with the current key.

I changed the led addon in my repo to check if a led has leds.function=kbd_backlight and provide then the org.freedesktop.Hal.Device.KeyboardBacklight interface instead of org.freedesktop.Hal.Device.Leds. Please check if this helps.

see:
http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=c900d0e5012b1dd0e0fa6e20fd0d92a59b3de093

[...]

Quoted 8 lines
Quoted 3 lines

I believe that we need a keyboard backlight addon that respond to KEY_KBDILLUM*
and update the corresponding /sys/class/vendor:color:kbd_backlight.

Oops, thats not the addons job. It's for something like the gnome power manager. It looks like g-p-m already picks up the device with a "keyboard_backlight" capability, and react to keyboard brightness key events.

Correct. It's not the job of the addon to react on keyevents. This is up to a desktop application which listen to the events and call then the interface. The same way it work for e.g. the brightness of your laptop panel.

Danny

#10 lore raw
Quoted 26 lines · Danny Kukawka
Quoted 4 lines · Alan Jenkins

I
think the idea is to use an FDI file to match our LED device (or possibly create it as a hal device... I'm still really fuzzy on hal), and then mark it as having the "keyboard_backlight" capability.

No, it wouldn't work this way. At least not with the current key.

I changed the led addon in my repo to check if a led has leds.function=kbd_backlight and provide then the org.freedesktop.Hal.Device.KeyboardBacklight interface instead of org.freedesktop.Hal.Device.Leds. Please check if this helps.

see:
http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=c900d0e5012b1dd0e0fa6e20fd0d92a59b3de093

[...]

Quoted 8 lines
Quoted 3 lines

I believe that we need a keyboard backlight addon that respond to KEY_KBDILLUM*
and update the corresponding /sys/class/vendor:color:kbd_backlight.

Oops, thats not the addons job. It's for something like the gnome power manager. It looks like g-p-m already picks up the device with a "keyboard_backlight" capability, and react to keyboard brightness key events.

Quoted 6 lines

Correct. It's not the job of the addon to react on keyevents. This is up to a
desktop application which listen to the events and call then the interface. The same way it work for e.g. the brightness of your laptop panel.

Danny

Thanks! It's not my hardware, but I think I see an issue:

Don't you also need to set "keyboard_backlight.num_levels"? According to Documentation/leds-class.txt, valid led values are 0-255, so I expect num_levels should be set to 256.

Yuck... I think the backlight interface is better in that it exports the available granularity. But I guess all one really wants is "on" and "off", with finer adjustment being either automatic (light sensor) or buried as a config option.

I assume info.capabilities=["keyboard_backlight"] gets set automatically on the KeyboardBacklight interface.

Alan

#11 lore raw
Quoted 36 lines · Alan Jenkins
Quoted 26 lines · Danny Kukawka
Quoted 4 lines · Alan Jenkins

I
think the idea is to use an FDI file to match our LED device (or possibly create it as a hal device... I'm still really fuzzy on hal), and then mark it as having the "keyboard_backlight" capability.

No, it wouldn't work this way. At least not with the current key.

I changed the led addon in my repo to check if a led has leds.function=kbd_backlight and provide then the org.freedesktop.Hal.Device.KeyboardBacklight interface instead of org.freedesktop.Hal.Device.Leds. Please check if this helps.

see:
http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=c900d0e5012b1dd0e0fa6e20fd0d92a59b3de093

[...]

Quoted 8 lines
Quoted 3 lines

I believe that we need a keyboard backlight addon that respond to KEY_KBDILLUM*
and update the corresponding /sys/class/vendor:color:kbd_backlight.

Oops, thats not the addons job. It's for something like the gnome power manager. It looks like g-p-m already picks up the device with a "keyboard_backlight" capability, and react to keyboard brightness key events.

Quoted 8 lines

Correct. It's not the job of the addon to react on keyevents. This is up to
a
desktop application which listen to the events and call then the interface.
The same way it work for e.g. the brightness of your laptop panel.

Danny

Quoted 8 lines

Thanks! It's not my hardware, but I think I see an issue:

Don't you also need to set "keyboard_backlight.num_levels"? According to Documentation/leds-class.txt, valid led values are 0-255, so I expect num_levels should be set to 256.

Yuck... I think the backlight interface is better in that it exports the available granularity.

^
Sorry, to avoid confusion I was moaning about the _kernel_ backlight interface. Apologies for being obscure.

Thanks again
Alan

#12 lore raw
In reply to Alan Jenkins
Quoted 2 lines
Quoted 2 lines

see:
http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=c900d0e5012b1dd0e0fa6e20fd0d92a59b3de093

It's not my hardware either, but I can try to create a fake kbd_keyboard led to test that.

Quoted 3 lines

Don't you also need to set "keyboard_backlight.num_levels"?  According to Documentation/leds-class.txt, valid led values are 0-255, so I expect num_levels should be set to 256.

Valid led values are between 0 and max_brightness (like for backlight I think). I think the led addon should set keyboard_backlight.num_levels to max_brightness (+1 ?).

Quoted 4 lines

Yuck... I think the backlight interface is better in that it exports the available granularity.  But I guess all one really wants is "on" and "off", with finer adjustment being either automatic (light sensor) or buried as a config option.

On the Asus U50 there is 3 levels (+ off), and keys to change the brightness. And the user want to use all the backlight levels with the Fn+F3/F4 keys.

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net - http://uffs.org
#13 lore raw
Quoted 15 lines · On Sunday 02 August 2009 09:20:00 Corentin Chary wrote:
Quoted 3 lines
Quoted 3 lines

see:
http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=c900d0e5012b1dd0e0f
a6e20fd0d92a59b3de093

It's not my hardware either, but I can try to create a fake kbd_keyboard led to test that.

Quoted 3 lines

Don't you also need to set "keyboard_backlight.num_levels"? According to Documentation/leds-class.txt, valid led values are 0-255, so I expect num_levels should be set to 256.

Valid led values are between 0 and max_brightness (like for backlight I think). I think the led addon should set keyboard_backlight.num_levels to max_brightness (+1 ?).

Quoted 8 lines
Quoted 4 lines

Yuck... I think the backlight interface is better in that it exports the available granularity. But I guess all one really wants is "on" and "off", with finer adjustment being either automatic (light sensor) or buried as a config option.

On the Asus U50 there is 3 levels (+ off), and keys to change the brightness. And the user want to use all the backlight levels with the Fn+F3/F4 keys.

Hi Danny,
I was trying to add keyboard_backlight.num_levels support for your modified led-addon. But there is something I don't understand :- keyboard_backlight.num_levels is used in:
- examples/light_sensors_and_keyboard_backlight.py
- fdi/policy/10osvendor/10-macbookpro-utils.fdi
- kde/solid/hal/halpower.cpp
But it is not defined in doc/spec/hal-spec-properties.xml.

Should I make another patch to fix hal-spec-properties ?

Thanks,

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net - http://uffs.org
#14 lore raw
Quoted 10 lines · Corentin Chary

Hi Danny,
I was trying to add keyboard_backlight.num_levels support for your modified led-addon. But there is something I don't understand :- keyboard_backlight.num_levels is used in:
- examples/light_sensors_and_keyboard_backlight.py
- fdi/policy/10osvendor/10-macbookpro-utils.fdi
- kde/solid/hal/halpower.cpp
But it is not defined in doc/spec/hal-spec-properties.xml.

Should I make another patch to fix hal-spec-properties ?

Can you please provide a "grep . */*" from /sys/class/leds/ with the affected device? If I read the kernel doc for leds (which this device is), we don't need a num_levels for it:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/leds-class.txt;h=6399557cdab3d6542a0feea0c0cd2c6b2af5ffad;hb=HEAD

"... The brightness file will set the brightness of the LED (taking a value 0-255). Most LEDs don't have hardware brightness support so will just be turned on for non-zero brightness settings. ..."

Danny

#15 lore raw
Quoted 16 lines · Danny Kukawka
Quoted 10 lines · Corentin Chary

Hi Danny,
I was trying to add keyboard_backlight.num_levels support for your modified led-addon. But there is something I don't understand :- keyboard_backlight.num_levels is used in:
- examples/light_sensors_and_keyboard_backlight.py
- fdi/policy/10osvendor/10-macbookpro-utils.fdi
- kde/solid/hal/halpower.cpp
But it is not defined in doc/spec/hal-spec-properties.xml.

Should I make another patch to fix hal-spec-properties ?

Can you please provide a "grep . */*" from /sys/class/leds/ with the affected device? If I read the kernel doc for leds (which this device is), we don't need a num_levels for it:

Quoted 6 lines

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/leds-class.txt;h=6399557cdab3d6542a0feea0c0cd2c6b2af5ffad;hb=HEAD

"... The brightness file will set the brightness of the LED (taking a value 0-255). Most LEDs don't have hardware brightness support so will just be turned on for non-zero brightness settings. ..."

The documentation is probably out of date, the led class provide a max_brightness file. 255 is the default value, but it can be overridden.

See: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/leds/led-class.c;h=f2cc13d76810f457c752d6f92f53759980f465ea;hb=HEAD#l76

leds-dac124s085.c define it to 0xFFF for example.
And asus-laptop will soon use 3 as max_brightness for asus::kbd_backlight.

But still, it seems that examples/light_sensors_and_keyboard_backlight.py and others are using something that is not defined in hal-spec-properties.

Thanks,

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net - http://uffs.org
#16 lore raw
Quoted 1 line · Corentin Chary

On Thu, Aug 6, 2009 at 12:48 PM, Danny Kukawka<[email protected]> wrote:

[...]

Quoted 20 lines
Quoted 11 lines

Can you please provide a "grep . */*" from /sys/class/leds/ with the affected device? If I read the kernel doc for leds (which this device is), we don't need a num_levels for it:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f
=Documentation/leds-class.txt;h=6399557cdab3d6542a0feea0c0cd2c6b2af5ffad;h b=HEAD

"... The brightness file will set the brightness of the LED (taking a value 0-255). Most LEDs don't have hardware brightness support so will just be turned on for non-zero brightness settings. ..."

The documentation is probably out of date, the led class provide a max_brightness file. 255 is the default value, but it can be overridden.

See:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=d
rivers/leds/led-class.c;h=f2cc13d76810f457c752d6f92f53759980f465ea;hb=HEAD#l 76

Quoted 5 lines

leds-dac124s085.c define it to 0xFFF for example.
And asus-laptop will soon use 3 as max_brightness for asus::kbd_backlight.

But still, it seems that examples/light_sensors_and_keyboard_backlight.py and others are using something that is not defined in hal-spec-properties.

Thanks for the information. Please check out my latest commits:
http://cgit.freedesktop.org/~dkukawka/hal/log/

I hope this finally solve the problem.

Danny

#17 lore raw
Quoted 26 lines · Danny Kukawka
Quoted 1 line · Corentin Chary

On Thu, Aug 6, 2009 at 12:48 PM, Danny Kukawka<[email protected]> wrote:

[...]

Quoted 23 lines
Quoted 11 lines

Can you please provide a "grep . */*" from /sys/class/leds/ with the affected device? If I read the kernel doc for leds (which this device is), we don't need a num_levels for it:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f
=Documentation/leds-class.txt;h=6399557cdab3d6542a0feea0c0cd2c6b2af5ffad;h b=HEAD

"... The brightness file will set the brightness of the LED (taking a value 0-255). Most LEDs don't have hardware brightness support so will just be turned on for non-zero brightness settings. ..."

The documentation is probably out of date, the led class provide a max_brightness file. 255 is the default value, but it can be overridden.

See:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=d
rivers/leds/led-class.c;h=f2cc13d76810f457c752d6f92f53759980f465ea;hb=HEAD#l 76

leds-dac124s085.c define it to 0xFFF for example.
And asus-laptop will soon use 3 as max_brightness for asus::kbd_backlight.

Quoted 7 lines
Quoted 2 lines

But still, it seems that examples/light_sensors_and_keyboard_backlight.py and others are using something that is not defined in hal-spec-properties.

Thanks for the information. Please check out my latest commits:
http://cgit.freedesktop.org/~dkukawka/hal/log/

I hope this finally solve the problem.

It seems ok, I'll try it ASAP and report any problem.

I'll also write Documentation/ABI/testing/sysfs-class-{led-backlight-lcd} and update Documentation/led-class.txt to avoid any confusion.

Thanks,

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net - http://uffs.org
#18 lore raw
In reply to Danny Kukawka
Quoted 29 lines · Danny Kukawka
Quoted 1 line · Corentin Chary

On Thu, Aug 6, 2009 at 12:48 PM, Danny Kukawka<[email protected]> wrote:

[...]

Quoted 20 lines
Quoted 11 lines

Can you please provide a "grep . */*" from /sys/class/leds/ with the affected device? If I read the kernel doc for leds (which this device is), we don't need a num_levels for it:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f
=Documentation/leds-class.txt;h=6399557cdab3d6542a0feea0c0cd2c6b2af5ffad;h b=HEAD

"... The brightness file will set the brightness of the LED (taking a value 0-255). Most LEDs don't have hardware brightness support so will just be turned on for non-zero brightness settings. ..."

The documentation is probably out of date, the led class provide a max_brightness file. 255 is the default value, but it can be overridden.

See:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=d
rivers/leds/led-class.c;h=f2cc13d76810f457c752d6f92f53759980f465ea;hb=HEAD#l 76

Quoted 5 lines

leds-dac124s085.c define it to 0xFFF for example.
And asus-laptop will soon use 3 as max_brightness for asus::kbd_backlight.

But still, it seems that examples/light_sensors_and_keyboard_backlight.py and others are using something that is not defined in hal-spec-properties.

Quoted 9 lines

Thanks for the information. Please check out my latest commits:
http://cgit.freedesktop.org/~dkukawka/hal/log/

I hope this finally solve the problem.

Danny

Hi,
Was this patch merged upstream ?
Do we need to do something else for DeviceKit now that hal is deprecated ? Thanks

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net