Re: [PATCH v4 2/8] iio: adc: ad7606: move 'val' pointer to ad7606_scan_direct()
From: David Lechner
Date: Thu Sep 05 2024 - 17:37:42 EST
On 9/5/24 3:23 AM, Alexandru Ardelean wrote:
> The ad7606_scan_direct() function returns 'int', which is fine for 16-bit
> samples.
> But when going to 18-bit samples, these need to be implemented as 32-bit
> (or int) type.
>
> In that case when getting samples (which can be negative), we'd get random
> error codes.
> So, the easiest thing is to just move the 'val' pointer to
> 'ad7606_scan_direct()'. This doesn't qualify as a fix, it's just a
> preparation for 18-bit ADCs (of the AD7606 family).
>
> Signed-off-by: Alexandru Ardelean <aardelean@xxxxxxxxxxxx>
> ---
Reviewed-by: David Lechner <dlechner@xxxxxxxxxxxx>