Hi Wolfram, On Mon, Jun 28, 2021 at 05:55:01PM +0200, Wolfram Sang wrote: > > > I could fix this in the driver by calling of_device_get_match_data() in > > the probe function with dev->of_node is not NULL, but I feel this is > > really an issue that should be handled by the framework. Has anyone ever > > given it a thought ? > > The of entries should also have .data entries and use that. That doesn't help unfortunately, as the i2c_device_id passed to probe() comes from the i2c_device_id table, the of_device_id table isn't involved. > The driver could also be converted to probe_new to become independent of > the i2c_device_id. Sure, but that doesn't solve the problem, it only forces the driver to basically implement if (dev->of_node) get data using of_device_get_match_data(); else get data using i2c_match_id(); Shouldn't the I2C subsystem provide a single function to let the driver retrieve the match data, regardless of where it comes from ? -- Regards, Laurent Pinchart