Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1764eff7 authored by Sascha Hauer's avatar Sascha Hauer Committed by Jonathan Cameron
Browse files

staging iio adt7410: fix 13bit mode



The driver assumes that in 13bit mode the 16bit value has
to be shifted to the right by 3 bits. This is not true, in
both 16bit and 13bit mode the MSB is at the same position.
Currently the driver returns a temperature of 194 degrees
Celsius in 13bit mode and 24 degrees Celsius in 16bit mode.
Fix this by using the same algorithm for 16bit and 13bit
mode and by just masking out the lower three bits in 13bit
mode.

Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Acked-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 3a427d18
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment