lkml.org 
[lkml]   [2023]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2023-10-10 12:26    [W:0.097 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site