Skip to content

Commit b3fa3b5

Browse files
vantomanvbajs
authored andcommitted
power: ti: pd_policy_manager: Correct die temperature unit conversion
Corrected the formula for converting raw ADC values to temperature. Signed-off-by: Yahya Wessam <yahyawessam2002@gmail.com>
1 parent b552f84 commit b3fa3b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/power/supply/ti/pd_policy_manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ static void usbpd_pm_update_cp_status(struct usbpd_pm *pdpm)
491491
ret = power_supply_get_property(pdpm->cp_psy,
492492
POWER_SUPPLY_PROP_TI_DIE_TEMPERATURE, &val);
493493
if (!ret)
494-
pdpm->cp.die_temp = val.intval;
494+
pdpm->cp.die_temp = val.intval / 10;
495495

496496
ret = power_supply_get_property(pdpm->cp_psy,
497497
POWER_SUPPLY_PROP_TI_BATTERY_PRESENT, &val);

0 commit comments

Comments
 (0)