[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251207130411.5b0d7a0f@jic23-huawei>
Date: Sun, 7 Dec 2025 13:04:11 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Tomas Melin <tomas.melin@...sala.com>, Lars-Peter Clausen
<lars@...afoo.de>, Michael Hennerich <Michael.Hennerich@...log.com>, Nuno
Sa <nuno.sa@...log.com>, David Lechner <dlechner@...libre.com>, Andy
Shevchenko <andy@...nel.org>, Alexandru Ardelean
<alexandru.ardelean@...log.com>, Jonathan Cameron
<Jonathan.Cameron@...wei.com>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] iio: adc: ad9467: support write/read offset
On Wed, 3 Dec 2025 11:04:08 +0200
Andy Shevchenko <andriy.shevchenko@...el.com> 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,
> > >>> + },
> > >>> + },
> > >>> };
>
Powered by blists - more mailing lists