power: add qpnp fuel gauge driver
This adds the driver to support the
fuel gauge peripheral on PMI8994.
The initial driver is able to supply userspace
with the following properties via the power supply
framework.
* POWER_SUPPLY_PROP_CAPACITY:
- The state of charge of the battery in percent.
* POWER_SUPPLY_PROP_CURRENT_NOW:
- The battery current with 32 mA resolution.
* POWER_SUPPLY_PROP_VOLTAGE_NOW:
- The battery voltage with 32 mV resolution.
The fuel gauge driver wakes up the system if
either FULL (100%) or EMPTY (0%) state of charge (SOC)
has been reached to allow userspace to take appropriate
action.
In addition to this there are also non-wakeable interrupts
for each SOC change via the DELTA_SOC interrupt.
Each SOC change is conveyed to consumers via the power_supply
framework. If a given kernel driver needs to subscribe to
these events, one must expand the fg_supplicants string array.
Change-Id: I633cf48b4b3c0b1389327a8272b6df974fa03808
Signed-off-by:
David Keitel <dkeitel@codeaurora.org>
Loading
Please register or sign in to comment