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: NPeter Meerwald <pmeerw@pmeerw.net> Acked-by: NAngelo Compagnucci <angelo.compagnucci@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
Showing
想要评论请 注册 或 登录