iio: adc: ad7606: use realbits for sign-extending in scan_direct
Currently the 'ad7606' driver supports parts with 18 and 16 bits resolutions. But when adding support for AD7607 (which has a 14-bit resolution) we should check for the 'realbits' field, to be able to sign-extend correctly. Signed-off-by:Alexandru Ardelean <aardelean@baylibre.com> Reviewed-by:
David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241025095939.271811-3-aardelean@baylibre.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Loading
Please sign in to comment