Droid 4 power_supply/battery sysfs properties (cpcap-battery)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to get UPower to return a non-zero battery percentage on the
Droid4, and I'm running into some problems, related to the values
exposed in sysfs, here:

/sys/devices/platform/44000000.ocp/48098000.spi/spi_master/spi0/spi0.0/48098000.spi:pmic@0:battery/power_supply/battery/

I first noticed that /capacity was not available, but /capacity_level
is. Reading Documentation/power/power_supply_class.txt, it seems that
/capacity should only be available when the hardware supports it (and
not extrapolated from voltage levels for example) - unchanged since
initial commit in 2007.

It goes on to suggest that userspace could perhaps do something clever
to deal with lack of these values. UPower can fall back to reading
/energy_now and /energy_full ; but this is also not available.
As far as I can tell, it doesn't (want to?) deal with extrapolating
based on min/max/current voltage.

If the device is not a battery (!), UPower will also try to set a rough
estimate based on /capacity_level, which would work for the Droid4,
except that ... it is a battery, so UPower decides not to read
/capacity_level. (I will see about filing a bug with them about this)

My question is - would it be possible to get /energy_now and
/energy_full available as properties, or does the chip not expose this?
(I guess that if it did, /capacity would also be available?)

Other suggestions are also appreciated.

Cheers,
Merlijn

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux