thermal: imx_tmu: Check the TEMP range for iMX8MM
authorPeng Fan <peng.fan@nxp.com>
Sun, 3 May 2020 14:19:50 +0000 (22:19 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 10 May 2020 18:55:20 +0000 (20:55 +0200)
commit951bf19dae2198c7684e4bb3f1eae10ba60d3677
tree43b5ebce38795d6275b88c836f98127963776ab1
parentb5447b98f24784459225ea0cc2729b1cdb1e3136
thermal: imx_tmu: Check the TEMP range for iMX8MM

On iMX8MM, the V flag in TRISTR register only reflect the state of SNSR
value, not the calibrated TEMP value. So checking this flag is not
reliable. Per IC suggestion, change to read the TEMP/AVG_TEMP directly
and check whether it in valid range 10-125C.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/thermal/imx_tmu.c