EV_PWR events for reporting battery state?
Hi,
I'm developing device driver for a bluetooth device. I need to report battery state/ac plugged status via input_event function. I've 2 ideas what event I could use: EV_MSC/MSC_RAW or define something for EV_PWR i.e.:PWR_BAT for reporting battery operation,PWR_AC for ac connected andPWR_STT for battery state.
There are some definitions in HID usage tables in HID specification, but I cannot see any of them implemented in kernel (or I omitted something). Are my ideas fine or there is a standard way or reporting battery condition of a wireless device - a way that I cannot find? --
Regards
Przemo
Hi Przemo,
Quoted 11 lines · Przemo Firszt
Hi,
I'm developing device driver for a bluetooth device. I need to report battery state/ac plugged status viainput_eventfunction. I've 2 ideas what event I could use: EV_MSC/MSC_RAW or define something forEV_PWRi.e.:PWR_BATfor reporting battery operation,PWR_ACfor ac connected andPWR_STTfor battery state.There are some definitions in HID usage tables in HID specification, but I cannot see any of them implemented in kernel (or I omitted something).
I maintain that these kind of events are outside of input subsystem doman (which I would like to limit to human interfaces, not general purpose transport).
Signature · 1 line
Dmitry
Dnia 2010-02-16, wto o godzinie 21:19 -0800, Dmitry Torokhov pisze:
Quoted 1 line
Hi Przemo,
[..]
Quoted 6 lines
Quoted 2 lines
There are some definitions in HID usage tables in HID specification, but I cannot see any of them implemented in kernel (or I omitted something).
I maintain that these kind of events are outside of input subsystem doman (which I would like to limit to human interfaces, not general purpose transport).
Hi Dmitry,
OK, it makes sense. I'll use sysfs then.
--
Thanks,
Przemo