Can we create devices not backed by sysfs?

Richard Hughes hughsient at gmail.com
Wed Aug 6 04:52:45 PDT 2008


I need to know if DeviceKit(-power) can, and should, support virtual
devices that are not backed by a DevkitDevice. For instance:

I have a laptop with two batteries. Each one reports the charge in
percentage and the time remaining to discharge.

To find out the percentage, we have to average both percentages, and
also have to perform some clever maths on the time remaining taking into
account the different battery capacities. This is something I currently
do in g-p-m, but ideally want to move all the clever maths and stats
down into DeviceKit.

For this I need a battery of type "virtual" which is aware of the other
batteries in the system but is a virtual statistical model of a single
laptop battery.

This sort of thing is going to be needed by the UPS and mice devices
too, as they are not exposed in sysfs. Ideas? Crack?

Richard.




More information about the devkit-devel mailing list