Commit cdaeb151 authored by Jonathan Bakker's avatar Jonathan Bakker Committed by Sebastian Reichel

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: default avatarJonathan Bakker <xc-racer2@live.ca>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 9584051f
...@@ -791,7 +791,6 @@ static int charger_get_property(struct power_supply *psy, ...@@ -791,7 +791,6 @@ static int charger_get_property(struct power_supply *psy,
POWER_SUPPLY_PROP_CURRENT_NOW, val); POWER_SUPPLY_PROP_CURRENT_NOW, val);
break; break;
case POWER_SUPPLY_PROP_TEMP: case POWER_SUPPLY_PROP_TEMP:
case POWER_SUPPLY_PROP_TEMP_AMBIENT:
return cm_get_battery_temperature(cm, &val->intval); return cm_get_battery_temperature(cm, &val->intval);
case POWER_SUPPLY_PROP_CAPACITY: case POWER_SUPPLY_PROP_CAPACITY:
if (!is_batt_present(cm)) { if (!is_batt_present(cm)) {
...@@ -899,8 +898,7 @@ static enum power_supply_property default_charger_props[] = { ...@@ -899,8 +898,7 @@ static enum power_supply_property default_charger_props[] = {
* Optional properties are: * Optional properties are:
* POWER_SUPPLY_PROP_CHARGE_NOW, * POWER_SUPPLY_PROP_CHARGE_NOW,
* POWER_SUPPLY_PROP_CURRENT_NOW, * POWER_SUPPLY_PROP_CURRENT_NOW,
* POWER_SUPPLY_PROP_TEMP, and * POWER_SUPPLY_PROP_TEMP,
* POWER_SUPPLY_PROP_TEMP_AMBIENT,
*/ */
}; };
...@@ -1298,7 +1296,7 @@ static int cm_init_thermal_data(struct charger_manager *cm, ...@@ -1298,7 +1296,7 @@ static int cm_init_thermal_data(struct charger_manager *cm,
return PTR_ERR(cm->tzd_batt); return PTR_ERR(cm->tzd_batt);
/* Use external thermometer */ /* Use external thermometer */
properties[*num_properties] = POWER_SUPPLY_PROP_TEMP_AMBIENT; properties[*num_properties] = POWER_SUPPLY_PROP_TEMP;
(*num_properties)++; (*num_properties)++;
cm->desc->measure_battery_temp = true; cm->desc->measure_battery_temp = true;
ret = 0; ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment