1
0
Fork 0

MLK-23359 thermal: imx8mm: Fix the ready bit check on imx8mp

the ready bit check for each sensor should be left shift
n bit, so fix it.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Jacky Bai 2020-03-09 09:36:54 +08:00
parent d556e82dea
commit 3a8a0a638e
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ static int tmu_get_temp(void *data, int *temp)
return -EAGAIN;
} else {
val = readl_relaxed(tmu->base + TRITSR);
ready = val & (sensor->hw_id + PROBE0_STATUS_OFFSET);
ready = val & (1 << (sensor->hw_id + PROBE0_STATUS_OFFSET));
val = (val >> sensor->hw_id * PROBE0_VAL_OFFSET) & TRITSR_VAL_MASK;
if (val & SIGN_BIT) /* negative */
val = (~(val & TEMP_VAL_MASK) + 1);