Skip to content

Commit ed4b641

Browse files
LeoCX-Tsaikiram9
authored andcommitted
fwk: hx20: fix temps read
because TGL still use common f75303 read it's based on C to K, so add config switch between k and mk. (this effect is made by commit 4ecf7a2) fail temps local_f75397@4c 0 K (= -273 C) 0% (313 K and 328 K) cpu_f75303@4d 0 K (= -273 C) 0% (323 K and 341 K) battery_temp@b 296 K (= 23 C) 0% (313 K and 323 K) ddr_f75303@4d 0 K (= -273 C) 0% (313 K and 342 K) use this commit local_f75397@4c 298 K (= 25 C) 0% (313 K and 328 K) cpu_f75303@4d 304 K (= 31 C) 0% (323 K and 341 K) battery_temp@b 296 K (= 23 C) 0% (313 K and 323 K) ddr_f75303@4d 296 K (= 23 C) 0% (313 K and 342 K) BRANCH=fwk-hx20-hx30-4410 BUG=None TEST=test on TGL, boot to system type temps on ec console check temps have return current value Signed-off-by: LeoCX_Tsai <[email protected]>
1 parent f8203c2 commit ed4b641

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

driver/temp_sensor/f75303.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ int f75303_get_val(int idx, int *temp)
100100
if (!f75303_enabled)
101101
return EC_ERROR_NOT_POWERED;
102102

103+
#ifndef CONFIG_CUSTOMIZED_DESIGN
104+
*temp = temps[idx];
105+
#else
103106
*temp = MILLI_KELVIN_TO_KELVIN(temps[idx]);
107+
#endif
104108
return EC_SUCCESS;
105109
}
106110

driver/temp_sensor/f75397.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ int f75397_get_val(int idx, int *temp)
9090
if (!f75397_enabled)
9191
return EC_ERROR_NOT_POWERED;
9292

93+
#ifndef CONFIG_CUSTOMIZED_DESIGN
94+
*temp = temps[idx];
95+
#else
9396
*temp = MILLI_KELVIN_TO_KELVIN(temps[idx]);
97+
#endif
9498
return EC_SUCCESS;
9599
}
96100

0 commit comments

Comments
 (0)