[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a0adfe1-3847-40c6-ae95-73cd3f41786c@vaisala.com>
Date: Wed, 14 Jan 2026 09:39:32 +0200
From: Tomas Melin <tomas.melin@...sala.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Michael Hennerich <Michael.Hennerich@...log.com>,
Nuno Sa <nuno.sa@...log.com>, Lars-Peter Clausen <lars@...afoo.de>,
Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
Andy Shevchenko <andy@...nel.org>,
Olivier Moysan <olivier.moysan@...s.st.com>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] iio: industrialio-backend: support backend
capabilities
Hi,
On 13/01/2026 23:06, Andy Shevchenko wrote:
> On Tue, Jan 13, 2026 at 12:12:48PM +0000, Tomas Melin wrote:
>> Not all backends support the full set of capabilities provided by the
>> industrialio-backend framework. Capability bits can be used in frontends
>> and backends for checking for a certain feature set, or if using
>> related functions can be expected to fail.
>>
>> Capability bits should be set by a compatible backend and provided when
>> registering the backend.
>
> ...
>
>> struct iio_backend {
>
>> u8 idx;
>> + u32 caps;
>
> Please, run `pahole` to see if there is a better place for a new member.
> (I bet there is.)
Indeed, there seems to be. Thanks for the suggestion, will update.
>
>> };
>
> ...
>
>> +enum iio_backend_capabilities {
>> + IIO_BACKEND_CAP_TEST_PATTERNS = BIT(0),
>> + IIO_BACKEND_CAP_BUFFERING = BIT(1),
>> + IIO_BACKEND_CAP_CALIBRATION = BIT(2)
>
> Add trailing comma, it will allow to avoid unneeded churn in the future.
Sounds good, was just following existing style.
Thanks,
Tomas
>
>> +};
>
>
Powered by blists - more mailing lists