Re: [PATCH v3 2/4] iio: industrialio-backend: support backend capabilities

Tomas Melin
2026-01-20T06:46:06Z

Hi,

On 19/01/2026 17:00, David Lechner wrote:
> 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.
Yes absolutely, perhaps it was about the signature. That is on the
change list for next version.

Thanks,
Tomas

>
>>
>>>> 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. ;-)