Re: [PATCH v3 2/4] iio: industrialio-backend: support backend capabilities
From: David Lechner
Date: Mon Jan 19 2026 - 10:00:08 EST
On 1/19/26 7:49 AM, Tomas Melin wrote:
...
>>> int iio_backend_chan_enable(struct iio_backend *back, unsigned int chan);
>>> @@ -235,6 +251,7 @@ int iio_backend_read_raw(struct iio_backend *back,
>>> long mask);
>>> int iio_backend_extend_chan_spec(struct iio_backend *back,
>>> struct iio_chan_spec *chan);
>>> +int iio_backend_has_caps(struct iio_backend *back, u32 caps);
>>
>> Not what David suggested and I do agree with him FWIW.
> AFAIU this was exactly what was suggested. Citing:
Slight difference. Should return bool instead of int.
>
>>> bool iio_backend_has_capabilities(struct iio_backend *back, u32 flags)
>>> (caps is fine too if we want to keep it short)
>
> Using the longer format is not very practical. Can we keep it as
> iio_backend_has_caps ?
Yes, I said as much already. But I guess you are asking Nuno. ;-)