Re: [PATCH v6 10/10] iio: adc: ad7124: Implement temperature measurement

Jonathan Cameron
2024-12-11T19:23:11Z

On Mon, 9 Dec 2024 10:28:17 +0100
Uwe Kleine-König <u.kleine-koenig@baylibre.com> wrote:

> Hello Jonathan,
>
> On Fri, Dec 06, 2024 at 06:28:42PM +0100, Uwe Kleine-König wrote:
> > diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
> > index 9405cb579324..d858bffd2628 100644
> > --- a/drivers/iio/adc/ad7124.c
> > +++ b/drivers/iio/adc/ad7124.c
> > [...]
> > @@ -902,6 +941,37 @@ static int ad7124_parse_channel_config(struct iio_dev *indio_dev,
> > chan[channel].channel2 = ain[1];
> > }
> >
> > + if (num_channels < AD7124_MAX_CHANNELS) {
> > + st->channels[num_channels] = (struct ad7124_channel) {
> > + .nr = num_channels,
> > + .ain = AD7124_CHANNEL_AINP(AD7124_INPUT_TEMPSENSOR) |
> > + AD7124_CHANNEL_AINM(AD7124_INPUT_AVSS),
> > + .cfg = {
> > + .bipolar = true,
> > + },
> > + };
> > +
> > + chan[num_channels] = (struct iio_chan_spec) {
> > + .type = IIO_TEMP,
> > + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
> > + BIT(IIO_CHAN_INFO_SCALE) | BIT(IIO_CHAN_INFO_OFFSET) |
> > + BIT(IIO_CHAN_INFO_SAMP_FREQ),
> > + .scan_type = {
> > + /*
> > + * You might find it strange that a bipolar
> > + * measurement yields an unsigned value, but
> > + * this matches the device's manual.
> > + */
> > + .sign = 'u',
> > + .realbits = 24,
> > + .storagebits = 32,
> > + .endianness = IIO_BE,
> > + },
> > + .address = num_channels,
> > + .scan_index = num_channels,
> > + };
> > + };
>
> The kernel build bot wailed about the ; here. Should I send a proper
> patch, or can you still just rewrite your tree to drop it?

I tweaked it in the tree

Thanks,

Jonathan

>
> Best regards and thanks and sorry,
> Uwe