mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
mediatek: consider adc_oe thermal calibration value in efuse
The use of the adc_oe value stored in the efuse has been dropped in MediaTek's SDK during a recent refactorization of the temperature calculation formula. Don't ignore this offset value and again include it in raw-to-deg-celsius calculation. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
08e153c3c3
commit
e131a66e30
@ -131,7 +131,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
+ tmp = 100000 * 15 / 16 * 10000;
|
||||
+ tmp /= 4096 - 512 + mt->adc_ge;
|
||||
+ tmp /= 1490;
|
||||
+ tmp *= raw - mt->vts[sensno] - 2900;
|
||||
+ tmp *= raw - mt->vts[sensno] - 2900 - mt->adc_oe + 512;
|
||||
+
|
||||
+ return mt->degc_cali * 500 - tmp;
|
||||
+}
|
||||
|
Loading…
Reference in New Issue
Block a user