[PATCH 0/3] PMU and Battery interaction in regard to kobject uevent

Werner Almesberger werner at openmoko.org
Tue Jun 3 16:21:03 CEST 2008

Holger Freyther wrote:
> Now to the issue:
> 	- The battery code has the kobject but does not know about the pmu
> 	- The pmu knows about plugging but doesn't have the kobject.

At the risk of sounding incredibly stupid - do they *need* to know
of each other ?

If we look at a more general scenario, battery and charger don't have
to be as closely related as they are in GTA01 through GTA03.

E.g., you could have more than one battery or more than one non-battery
power source. In this case, you would want to consider adapter presence
and battery charging as quite separate types of events.

We even have a real-life example for this in Openmoko: HXD8 has car
and USB power.

So this may be yet another case where the kernel is better off just
providing the raw data, and it's user space that makes the connection.

- Werner

More information about the openmoko-kernel mailing list