Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 2d72ead2 authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

staging: iio: cdc: ad7746: Switch from _offset to _zeropoint for differential channels.


As this offset is applied equally to both lines of the differential
pair, _ofset should not be used. Use the new ABI _zeropoint instead
to avoid userspace software applying this value when calculating
real value = (_raw + _offset) * _scale

Also add a comment to explain why an offset of 0x800000 is applied
within the driver rather than exposed to userspace.

Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220626122938.582107-13-jic23@kernel.org
parent 5c64990b
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment