Re: [PATCH 15/15] iio: sx9310: use the data of the I2C table
From: Andy Shevchenko
Date: Tue Oct 27 2026 - 12:43:34 EST
On Tue, Oct 27, 2026 at 04:25:30PM +0000, Biju Das wrote:
> > -----Original Message-----
> > From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Sent: 27 October 2026 16:19
> >
> > sx9310_check_whoami() takes the chip information from device_get_match_data(), which only looks at the OF
> > and ACPI tables, and dereferences it. For a client which was bound through the i2c_device_id table, for
> > instance one created with
>
> Not sure we can extend device_get_match_data() to cover this use case?
It will be layering violation. device_get_match_data() has no clue what i2c or
spi or whatever bus is. So, the answer is definitely "no". (Technically, of
course, it's doable, but see above.)
--
With Best Regards,
Andy Shevchenko