Skip to contentSkip to conversation

EV_PWR events for reporting battery state?

DISCUSSION Przemo Firszt 2 participants 3 messages Feb 16, 2010 – Feb 18, 2010 HID

lore
Share & tools
lore
#0 lore raw

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 and
PWR_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

#1 lore raw

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 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 and
PWR_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).

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
#2 lore raw

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