Re: [PATCH v2 2/7] iio: core: Refactor iio_device_claim_direct() implementation

From: Andy Shevchenko

Date: Fri Dec 12 2025 - 13:23:36 EST


On Thu, Dec 11, 2025 at 09:45:20PM -0500, Kurt Borja wrote:
> In order to eventually unify the locking API, implement
> iio_device_claim_direct() fully inline, with the use of
> __iio_dev_mode_lock(), which takes care of sparse annotations.

...

> +/**
> + * iio_device_claim_direct - Keep device in direct mode
> + * @indio_dev: the iio_dev associated with the device
> + *
> + * If the device is in direct mode it is guaranteed to stay
> + * that way until iio_device_release_direct() is called.
> + *
> + * Use with iio_device_release_direct().

Nice.

> + * Returns: true on success, false on failure.
> */

...


> +/**
> + * iio_device_release_direct - Releases claim on direct mode
> + * @indio_dev: the iio_dev associated with the device
> + *
> + * Release the claim. Device is no longer guaranteed to stay
> + * in direct mode.
> + *
> + * Use with iio_device_claim_direct()

Not nice — missed period.

> + */

--
With Best Regards,
Andy Shevchenko