Re: [PATCH v2 2/2] iio: adc: ad9467: support write/read offset
From: Jonathan Cameron
Date: Sun Dec 07 2025 - 08:04:21 EST
On Wed, 3 Dec 2025 11:04:08 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Wed, Dec 03, 2025 at 09:28:23AM +0200, Tomas Melin wrote:
> > On 02/12/2025 17:01, Tomas Melin wrote:
> > > On 02/12/2025 16:11, Andy Shevchenko wrote:
> > >> On Tue, Dec 02, 2025 at 12:53:09PM +0000, Tomas Melin wrote:
>
> ...
>
> > >>> static const struct iio_chan_spec ad9434_channels[] = {
> > >>> - AD9467_CHAN(0, BIT(IIO_CHAN_INFO_SCALE), 0, 12, 's'),
> > >>> + {
> > >>> + .type = IIO_VOLTAGE,
> > >>> + .indexed = 1,
> > >>> + .channel = 0,
> > >>> + .info_mask_shared_by_type =
> > >>> + BIT(IIO_CHAN_INFO_SCALE) |
> > >>> + BIT(IIO_CHAN_INFO_SAMP_FREQ) |
> > >>> + BIT(IIO_CHAN_INFO_CALIBBIAS),
> > >>
> > >> Wrong indentation.
> > >
> > > Can you please provide example of your preferred indentation for this
> > > particular case? This is used in several places around the code and
> > > seemed like one of the more readable.
> >
> > Would this be the preferred indentation?
>
> Almost LGTM, thanks.
>
> > {
> > .type = IIO_VOLTAGE,
> > .indexed = 1,
> > .channel = 0,
> > .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) |
> > BIT(IIO_CHAN_INFO_SAMP_FREQ) |
> > BIT(IIO_CHAN_INFO_CALIBBIAS),
> > .info_mask_shared_by_type_available =
> > BIT(IIO_CHAN_INFO_SCALE) |
> > BIT(IIO_CHAN_INFO_CALIBBIAS),
>
> .info_mask_shared_by_type_available = BIT(IIO_CHAN_INFO_SCALE) |
> BIT(IIO_CHAN_INFO_CALIBBIAS),
>
> It's still less than 80.
>
> _OR_
>
> rake the style consistent with the second one
>
> .info_mask_shared_by_type =
> BIT(IIO_CHAN_INFO_SCALE) |
> BIT(IIO_CHAN_INFO_SAMP_FREQ) |
> BIT(IIO_CHAN_INFO_CALIBBIAS),
>
> But I dunno which one is preferred. These two are fine with me.
For the record, either of these is fine with me too.
Pick one option and use it consistently for similar elements.
>
> > .scan_index = 0,
> > .scan_type = {
> > .sign = 's',
> > .realbits = 12,
> > .storagebits = 16,
> > },
> > },
>
> > >>> + .info_mask_shared_by_type_available =
> > >>> + BIT(IIO_CHAN_INFO_SCALE) |
> > >>> + BIT(IIO_CHAN_INFO_CALIBBIAS),
> > >>
> > >> Ditto.
> > >>
> > >>> + .scan_index = 0,
> > >>> + .scan_type = {
> > >>> + .sign = 's',
> > >>> + .realbits = 12,
> > >>> + .storagebits = 16,
> > >>> + },
> > >>> + },
> > >>> };
>