[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240928183044.0b5ea2e0@jic23-huawei>
Date: Sat, 28 Sep 2024 18:30:44 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: Antoniu Miclaus <antoniu.miclaus@...log.com>, Lars-Peter Clausen
<lars@...afoo.de>, Michael Hennerich <Michael.Hennerich@...log.com>, Rob
Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor
Dooley <conor+dt@...nel.org>, Nuno Sa <nuno.sa@...log.com>, Olivier Moysan
<olivier.moysan@...s.st.com>, Uwe Kleine-König
<ukleinek@...nel.org>, Andy Shevchenko <andy@...nel.org>, Marcelo Schmitt
<marcelo.schmitt@...log.com>, João Paulo Gonçalves <joao.goncalves@...adex.com>, Mike Looijmans
<mike.looijmans@...ic.nl>, Dumitru Ceclan <mitrutzceclan@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Alisa-Dariana Roman <alisadariana@...il.com>, Sergiu Cuciurean
<sergiu.cuciurean@...log.com>, Dragos Bogdan <dragos.bogdan@...log.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-pwm@...r.kernel.org
Subject: Re: [PATCH 6/7] iio: adc: ad485x: add ad485x driver
>
> > +static struct iio_chan_spec_ext_info ad4858_ext_info[] = {
> > + IIO_ENUM("packet_format", IIO_SHARED_BY_ALL, &ad4858_packet_fmt),
> > + IIO_ENUM_AVAILABLE("packet_format",
> > + IIO_SHARED_BY_ALL, &ad4858_packet_fmt),
> > + {},
> > +};
> > +
> > +static struct iio_chan_spec_ext_info ad4857_ext_info[] = {
> > + IIO_ENUM("packet_format", IIO_SHARED_BY_ALL, &ad4857_packet_fmt),
> > + IIO_ENUM_AVAILABLE("packet_format",
> > + IIO_SHARED_BY_ALL, &ad4857_packet_fmt),
> > + {},
> > +};
>
> Usually, something like this packet format would be automatically
> selected when buffered reads are enabled based on what other features
> it provides are needed, i.e only enable the status bits when events
> are enabled.
>
> (For those that didn't read the datasheet, the different packet
> formats basically enable extra status bits per sample. And in the case
> of oversampling, one of the formats also selects a reduced number of
> sample bits.)
>
> We have quite a few parts in the pipline right like this one that have
> per-sample status bits. In the past, these were generally handled with
> IIO events, but this doesn't really work for these high-speed backends
> since the data is being piped directly to DMA and we don't look at
> each sample in the ADC driver. So it would be worthwhile to try to
> find some general solution here for handling this sort of thing.
We have previously talked about schemes to describe metadata
alongside channels. I guess maybe it's time to actually look at how
that works. I'm not sure dynamic control of that metadata
is going to be easy to do though or if we even want to
(as opposed to always on or off for a particular device).
Powered by blists - more mailing lists