Skip to contentSkip to conversation

question on LEDs on keyboards

DISCUSSION Oliver Neukum 2 participants 4 messages Oct 14, 2008 – Oct 16, 2008 HID

lore
Share & tools
lore
#0 lore raw

Hi,

I found an error in the hid autosuspend patches. Keyboards can have more than one LED. Is there a way to query the HID layer about active LEDs?

Regards
Oliver

#1 lore raw
Quoted 2 lines · Oliver Neukum

I found an error in the hid autosuspend patches. Keyboards can have more than one LED. Is there a way to query the HID layer about active LEDs?

Hi Oliver,

you can either get the information from the underlying input device, or you can use hidinput_find_field() to find the fields of EV_LED type, and obtain the value from the offset that this function gives you.

Hope this helps,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw

Am Dienstag, 14. Oktober 2008 15:32:41 schrieb Jiri Kosina:

Quoted 10 lines · Oliver Neukum
Quoted 3 lines

I found an error in the hid autosuspend patches. Keyboards can have more than one LED. Is there a way to query the HID layer about active LEDs?

Hi Oliver,

you can either get the information from the underlying input device, or you can use hidinput_find_field() to find the fields of EV_LED type, and obtain the value from the offset that this function gives you.

What is the prefered way of doing that? There seems to be no hid_get_field().

Regards
Oliver

#3 lore raw
Quoted 6 lines · Oliver Neukum
Quoted 5 lines
Quoted 2 lines

I found an error in the hid autosuspend patches. Keyboards can have more than one LED. Is there a way to query the HID layer about active LEDs?

you can either get the information from the underlying input device, or you can use hidinput_find_field() to find the fields of EV_LED type, and obtain the value from the offset that this function gives you.

What is the prefered way of doing that? There seems to be no hid_get_field().

Yes, there is no such function yet. If you need it in autosuspend patch and implement it, I'll happily merge it.

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs