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

Skip to content
Commit a5a3e431 authored by Peter Meerwald's avatar Peter Meerwald Committed by Jonathan Cameron
Browse files

iio: Fix sign extension table in mcp3422 driver



the index argument to sign_extend32() gives the bit position (from 0)
to the sign bit

so e.g. if the measurement has 16-bit resolution, we need to pass 15;
a measurement of 0x8000 should be reported as -32768, not 32768

Signed-off-by: default avatarPeter Meerwald <pmeerw@pmeerw.net>
Acked-by: default avatarAngelo Compagnucci <angelo.compagnucci@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent ec7f68e0
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