Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03966a99 authored by Todd Poynor's avatar Todd Poynor Committed by Ruchi Kandoi
Browse files

power: android: switch to nn.n format for temperature readings



Change-Id: I67b44e5c706c94f5e2031da9dab3dddb1a4b6b3f
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
parent 2b52afcd
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ static int android_bat_get_property(struct power_supply *ps,

static void android_bat_get_temp(struct android_bat_data *battery)
{
	int batt_temp = 25000;
	int batt_temp = 250000; /* 25.0C */
	int health = battery->batt_health;

	if (battery->pdata->get_temperature)
@@ -330,9 +330,10 @@ static void android_bat_monitor_work(struct work_struct *work)
		break;
	}

	pr_info("battery: l=%d v=%d c=%d temp=%d h=%d st=%d type=%s\n",
	pr_info("battery: l=%d v=%d c=%d temp=%d.%d h=%d st=%d type=%s\n",
		battery->batt_soc, battery->batt_vcell/1000,
		battery->batt_current, battery->batt_temp, battery->batt_health,
		battery->batt_current, battery->batt_temp / 10,
		battery->batt_temp % 10, battery->batt_health,
		battery->charging_status,
		charge_source_str(battery->charge_source));
	power_supply_changed(&battery->psy_bat);