On Sun, Aug 20, 2023 at 01:49:08PM +0100, Biju Das wrote: > Convert enum->pointer for data in the match tables, so that > device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c > bus type match support added to it. > I don't see why this would be necessary. You don't explain why the current implementation would no longer work. Various other drivers implement the same mechanism as this driver, i.e., type cast the return value of device_get_match_data() to a non-pointer. I'd argue that changing the functionality of device_get_match_data() such that this is no longer possible would be inherently flawed and would introduce unnecessary complexity to drivers using that mechanism today. If device_get_match_data() is enhanced to include the functionality of i2c_match_id(), it should be done in a way that doesn't mandate such an API change. > This patch series is only compile tested. I assume that means you don't have access to the chip. Is this correct ? Just asking, because it would be great to have a register dump which would enable me to write unit test code. Thanks, Guenter > > Biju Das (2): > hwmon: tmp513: Convert enum->pointer for data in the match tables > hwmon: tmp513: Add temp_config to struct tmp51x_info > > drivers/hwmon/tmp513.c | 51 ++++++++++++++++++++++-------------------- > 1 file changed, 27 insertions(+), 24 deletions(-) > > -- > 2.25.1 >