Thread (40 messages) 40 messages, 6 authors, 2017-04-14

Re: [PATCH v1 7/7] power: bq24190_charger: Set bq24190-battery device .type=unknown

From: Sebastian Reichel <sre@kernel.org>
Date: 2017-03-23 13:37:35

Hi,

On Thu, Mar 23, 2017 at 04:31:50AM -0700, Liam Breck wrote:
quoted
That still leaves the health status reading, though. From
userspace's point-of-view this should be merged into the
battery device, if fuel-gauge can't provide that information.
I think the bigger issue is that multiple sysfs devices for what is
conceptually one power supply is awkward. With the addition of static
battery object, we have yet another set of properties which belong to
that supply.
The simple-battery is consumed by the fuel-gauge, so not a problem.
A solution to this would be a core registry which allows various
drivers to submit properties to a named supply. Properties with the
same id (e.g. health) are OK given a tag (input-V, NTC-1, battery-V)
to differentiate them. Duplicates would be dropped (e.g. both drivers
submit monitored-battery stats). The result would be represented in
sysfs as a single device, where each property would appear as a file
or directory as necessary. And perhaps also as a file "health_summary"
which indicates whether there's trouble below decks.
Yes, that would be the proper solution. Might become important, if
more platforms with multiple chips providing battery information
appear. Since I don't think you want to implement your suggestion,
I suggest sticking to the custom "bat_fault" sysfs property. That
should already be exposed for the charger device as far as I can
see.

-- Sebastian

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help