Re: [PATCH v7 2/2] iio: adc: add MAX40080 current-sense amplifier driver
Jonathan Cameron <[email protected]>
| Newsgroups | org.kernel.vger.linux-devicetree,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <20260818171953.4dd76b83@jic23-huawei> |
> ...
>
> > +static const struct iio_chan_spec max40080_channels[] = {
> > + {
> > + .type = IIO_CURRENT,
> > + .indexed = 1,
>
> > + .channel = 0,
>
> No need
True, but I'd keep it because it is paired with indexed and looking
for both together is common.
>
> > + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
> > + BIT(IIO_CHAN_INFO_SCALE),
> > + .info_mask_separate_available = BIT(IIO_CHAN_INFO_SCALE),
> > + .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO),
> > + .info_mask_shared_by_all_available =
> > + BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO),
> > + },
> > + {
> > + .type = IIO_VOLTAGE,
> > + .indexed = 1,
>
> > + .channel = 0,
>
> Same, it's default.
>
> > + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
> > + BIT(IIO_CHAN_INFO_SCALE),
> > + .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO),
> > + .info_mask_shared_by_all_available =
> > + BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO),
> > + },
> > +};