power: qpnp-fg: add SRAM OCV and temperature readings
Add code to periodically update the readings of the following
power supply properties:
* POWER_SUPPLY_PROP_VOLTAGE_NOW
* POWER_SUPPLY_PROP_VOLTAGE_OCV
* POWER_SUPPLY_PROP_TEMP
* POWER_SUPPLY_PROP_CURRENT_NOW
The properties are updated in 30 second increments, unless
a fg_power_get_property happens prior, then a pending work
queue is canceled and the work is scheduled within 1 second
of the request.
Note that if a client abuses the userspace the work sync
will not be able to be rescheduled and thus may lead
to stale cached values.
Change-Id: I3b13c91253f67d6545a2119764098a44a86338bf
Signed-off-by:
David Keitel <dkeitel@codeaurora.org>
Loading
Please register or sign in to comment