Re: [PATCH v3 2/2] iio: adc: ad7173: add AD7173 driver

Jonathan Cameron
2023-10-10T10:26:16Z

>
> >> + chan[chan_index].differential = fwnode_property_read_bool(child, "bipolar");
> >
> > bipolar doesn't normally == differential.
> > You can have unipolar differential (just that you can't get a negative answer)
> > Perhaps just a terminology thing?
> >
>
> This device supports only differential channels. Here, the differential flag is used to show
> if bipolar coding should be used.

I'm confused - you are setting differential in the iio_chan_spec with this.
That affects the sysfs naming and a bunch of other stuff - not merely
the bipolar nature of the channel.

>
>
> >> + st->info = device_get_match_data(dev);
> >> + if (!st->info)
> >> + return -ENODEV;
> > This works for the cases of DT and ACPI but not for anyone just
> > using the spi_device_id table.
> > There is spi_device_get_match_data() to cover all options.
> >
> I could not find the spi_device_get_match_data() function in the repo.
> It appears however as a suggestion from Andy Shevchenko in a thread:
> https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2382960.html
> Is this it?

ah. I got the name wrong.
spi_get_device_match_data()