BUG: iio: mpu3050: Wrong temperature scale

From: Dmitry Osipenko
Date: Mon Apr 19 2021 - 02:06:19 EST


Hello,

Svyatoslav and me found that the MPU3050 IIO driver reports temperature
that is x10 larger than it should be on Asus Transformer TF201 and Acer
A500 tablet devices running mainline kernel. The driver uses
(x+23000)/280 formula for the conversion of raw temperature value, which
gives 82C for x=0, thus apparently formula is wrong because x=50000
should give us ~25C.

I tried to search for the datasheet with the formula, but couldn't find it.

Linus, will you be able to check whether the formula used by the driver
is correct? Thanks in advance.