Commit Graph

3 Commits

Author SHA1 Message Date
Subbaraman Narayanamurthy 2771cbc61b power: qpnp-fg: Add support for force loading battery data
Currently we support loading battery profile data based on the
best matching profile. If there are 2 battery profiles with the
same battery id, then the profile which is defined first will be
loaded. Provide a module parameter "qpnp_fg.battery_type" so that
the user can force load a battery profile data.

Change-Id: Ie3f0fc31a09b8173db9236109b4e019473f00288
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2014-10-22 13:53:15 -07:00
David Keitel 53478aac6e of_batterydata: add of_batterydata_get_best_profile API
This function simply queries POWER_SUPPLY_PROP_RESISTANCE_ID
from via the power supply framework for a given power supply.

It will find the closest matching profile contained within
batterydata_container_node which is matched via the
qcom,batt-id-kohm property.

Change-Id: I15a34b784cc23809df4db2deb583bd6c40bd182b
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2014-07-29 17:47:20 -07:00
Xiaozhe Shi 5346956160 of: batterydata: Introduce DT support for battery data
Add the of_batterydata driver to parse device tree battery data.

Battery data contains battery profile information and is used by the
charger and the BMS drivers.

Change-Id: Ibe03800be0d51e82194c9385c6348c5a6c92711d
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2013-09-04 17:11:19 -07:00