Re: [PATCH v3 08/10] iio: adc: ad7606: change r/w_register signature

From: David Lechner
Date: Fri Jan 31 2025 - 16:31:35 EST


On 1/29/25 5:03 AM, Angelo Dureghello wrote:
> From: Guillaume Stols <gstols@xxxxxxxxxxxx>
>
> The register read/write with IIO backend will require to claim the
> direct mode, and doing so requires passing the corresponding iio_dev
> structure.
> So we need to modify the function signature to pass the iio_dev
> structure.
>
> Signed-off-by: Guillaume Stols <gstols@xxxxxxxxxxxx>
> ---
I don't think calling iio_device_claim_direct_mode() inside there reg_read/write
functions is the right place to do that. It should be done at a higher level (in
case we need to combine multiple reads/writes in an atomic operation). So I
think we should drop this patch.