Messages in this thread | | | Date | Tue, 10 Oct 2023 11:26:21 +0100 | From | Jonathan Cameron <> | Subject | Re: [PATCH v3 2/2] iio: adc: ad7173: add AD7173 driver |
| |
> > >> + 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()
https://elixir.bootlin.com/linux/v6.6-rc5/source/drivers/spi/spi.c#L364
| |