diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2014-04-13 11:05:03 +0530 |
---|---|---|
committer | Laxman Dewangan <ldewangan@nvidia.com> | 2014-04-13 05:38:28 -0700 |
commit | ff66b38933844c9cd6b57abcf3073b13a35dc092 (patch) | |
tree | a9d082c41a4c4322fb6b351b96c7df28b32d7054 /include/linux/power | |
parent | f1d0c94ee899b600173bc504565c813936f5c92f (diff) |
power: batter-charger-gauge: add API for reading battery current
Add API for reading battery current throuch IIO channels.
IIO channel information is read from battery gauge device node.
bug 1413219
Change-Id: I87094acbd15796a16acb520ba52c2351439e4bbb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/395550
Diffstat (limited to 'include/linux/power')
-rw-r--r-- | include/linux/power/battery-charger-gauge-comm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/power/battery-charger-gauge-comm.h b/include/linux/power/battery-charger-gauge-comm.h index 81baae7a8987..f04ef645e57f 100644 --- a/include/linux/power/battery-charger-gauge-comm.h +++ b/include/linux/power/battery-charger-gauge-comm.h @@ -61,6 +61,7 @@ struct battery_charger_info { struct battery_gauge_info { int cell_id; const char *tz_name; + const char *current_channel_name; struct battery_gauge_ops *bg_ops; }; @@ -85,6 +86,8 @@ int battery_charging_system_power_on_usb_event( struct battery_charger_dev *bc_dev); int battery_gauge_get_battery_temperature(struct battery_gauge_dev *bg_dev, int *temp); +int battery_gauge_get_battery_current(struct battery_gauge_dev *bg_dev, + int *current_ma); int battery_charger_set_current_broadcast(struct battery_charger_dev *bc_dev); struct battery_gauge_dev *battery_gauge_register(struct device *dev, struct battery_gauge_info *bgi, void *drv_data); |