diff options
author | Jonathan Bakker <xc-racer2@live.ca> | 2020-05-15 01:04:28 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2020-08-28 19:05:57 +0200 |
commit | cdaeb15157cd3be32fcf05c668a70c8f7e009d5e (patch) | |
tree | c7df42127f570223f5cc4ee5b930307c204e8bf9 /drivers/power | |
parent | power: supply: charger-manager: Remove cm_notify_event function (diff) | |
download | linux-cdaeb15157cd3be32fcf05c668a70c8f7e009d5e.tar.xz linux-cdaeb15157cd3be32fcf05c668a70c8f7e009d5e.zip |
power: supply: charger-manager: Always use POWER_SUPPLY_PROP_TEMP
We were using POWER_SUPPLY_PROP_TEMP if the temperature was coming
via the fuel gauge and POWER_SUPPLY_PROP_TEMP_AMBIENT if it was
coming via the thermal framework. Since they're mutually
exclusive in the driver and we don't know if the thermal framework
is ambient or not, unify them both to use POWER_SUPPLY_PROP_TEMP.
Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/charger-manager.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index c18dc8d3ae1c..1edeb5625f29 100644 --- a/drivers/power/supply/charger-manager.c +++ b/drivers/power/supply/charger-manager.c @@ -791,7 +791,6 @@ static int charger_get_property(struct power_supply *psy, POWER_SUPPLY_PROP_CURRENT_NOW, val); break; case POWER_SUPPLY_PROP_TEMP: - case POWER_SUPPLY_PROP_TEMP_AMBIENT: return cm_get_battery_temperature(cm, &val->intval); case POWER_SUPPLY_PROP_CAPACITY: if (!is_batt_present(cm)) { @@ -899,8 +898,7 @@ static enum power_supply_property default_charger_props[] = { * Optional properties are: * POWER_SUPPLY_PROP_CHARGE_NOW, * POWER_SUPPLY_PROP_CURRENT_NOW, - * POWER_SUPPLY_PROP_TEMP, and - * POWER_SUPPLY_PROP_TEMP_AMBIENT, + * POWER_SUPPLY_PROP_TEMP, */ }; @@ -1298,7 +1296,7 @@ static int cm_init_thermal_data(struct charger_manager *cm, return PTR_ERR(cm->tzd_batt); /* Use external thermometer */ - properties[*num_properties] = POWER_SUPPLY_PROP_TEMP_AMBIENT; + properties[*num_properties] = POWER_SUPPLY_PROP_TEMP; (*num_properties)++; cm->desc->measure_battery_temp = true; ret = 0; |