Re: [PATCH v2 2/2] iio: adc: ad9467: support write/read offset
From: Andy Shevchenko
Date: Wed Dec 03 2025 - 04:05:49 EST
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.
> .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,
> >>> + },
> >>> + },
> >>> };
--
With Best Regards,
Andy Shevchenko