diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2013-07-03 12:54:52 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:33:49 -0700 |
commit | 014f199cb4f8b15eabe724bd0cdc846c367b17c5 (patch) | |
tree | 7603fae82d4b9a02cd5148bdf727ea5e4df3bfd3 /include/linux/power | |
parent | 254499e06cab3dab3f53be38f9fa48ddccebbe0d (diff) |
power: battery-charger: refactor thermal charging effect
For implementing the thermal effect, the battery charger driver
just need to pass the correct parameter as part of battery charger
driver registration. It need not to have thermal charger registration
and hence reduce the code.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/244667
(cherry picked from commit bde3c1327f11bae141e4b7c433c60ed367db0f97)
Change-Id: Ia35bc41f6c05764f166ad51bbc13a0d30e0243b7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/253367
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'include/linux/power')
-rw-r--r-- | include/linux/power/battery-charger-gauge-comm.h | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/include/linux/power/battery-charger-gauge-comm.h b/include/linux/power/battery-charger-gauge-comm.h index 641314fb288e..95791b54afb2 100644 --- a/include/linux/power/battery-charger-gauge-comm.h +++ b/include/linux/power/battery-charger-gauge-comm.h @@ -21,8 +21,8 @@ * 02111-1307, USA */ -#ifndef TEGRA_CHARGER_CORE_H -#define TEGRA_CHARGER_CORE_H +#ifndef _LINUX_POWER_BATTERY_CHARGER_GAUGE_COMM_H +#define _LINUX_POWER_BATTERY_CHARGER_GAUGE_COMM_H enum battery_charger_status { BATTERY_DISCHARGING, @@ -32,7 +32,6 @@ enum battery_charger_status { struct battery_gauge_dev; struct battery_charger_dev; -struct battery_charger_thermal_dev; struct battery_gauge_ops { int (*update_battery_status)(struct battery_gauge_dev *bg_device, @@ -42,24 +41,16 @@ struct battery_gauge_ops { struct battery_charging_ops { int (*get_charging_status)(struct battery_charger_dev *bc_dev); int (*restart_charging)(struct battery_charger_dev *bc_dev); -}; - -struct battery_charger_thermal_ops { - int (*thermal_configure)(struct battery_charger_thermal_dev *bct_dev, + int (*thermal_configure)(struct battery_charger_dev *bct_dev, int temp, bool enable_charger, bool enable_charg_half_current, int battery_voltage); }; struct battery_charger_info { - int cell_id; - struct battery_charging_ops *bc_ops; -}; - -struct battery_charger_thermal_info { - int cell_id; const char *tz_name; + int cell_id; int polling_time_sec; - struct battery_charger_thermal_ops *bct_ops; + struct battery_charging_ops *bc_ops; }; struct battery_gauge_info { @@ -74,16 +65,10 @@ void battery_charger_unregister(struct battery_charger_dev *bc_dev); int battery_charging_status_update(struct battery_charger_dev *bc_dev, enum battery_charger_status status); int battery_charging_restart(struct battery_charger_dev *bc_dev, int after_sec); - -struct battery_charger_thermal_dev *battery_charger_thermal_register( - struct device *dev, struct battery_charger_thermal_info *bci, - void *drv_data); -void battery_charger_thermal_unregister( - struct battery_charger_thermal_dev *bct_dev); int battery_charger_thermal_start_monitoring( - struct battery_charger_thermal_dev *bct_dev); + struct battery_charger_dev *bct_dev); int battery_charger_thermal_stop_monitoring( - struct battery_charger_thermal_dev *bct_dev); + struct battery_charger_dev *bct_dev); int battery_gauge_get_battery_temperature(struct battery_gauge_dev *bg_dev, int *temp); @@ -94,10 +79,7 @@ void battery_gauge_unregister(struct battery_gauge_dev *bg_dev); void *battery_charger_get_drvdata(struct battery_charger_dev *bc_dev); void battery_charger_set_drvdata(struct battery_charger_dev *bc_dev, void *data); -void *battery_charger_thermal_get_drvdata( - struct battery_charger_thermal_dev *bct_dev); -void battery_charger_thermal_set_drvdata( - struct battery_charger_thermal_dev *bct_dev, void *data); void *battery_gauge_get_drvdata(struct battery_gauge_dev *bg_dev); void battery_gauge_set_drvdata(struct battery_gauge_dev *bg_dev, void *data); -#endif + +#endif /* _LINUX_POWER_BATTERY_CHARGER_GAUGE_COMM_H */ |