Hi Andy Shevchenko, Thanks for the feedback. > Subject: Re: [PATCH] iio: accel: mma8452: Convert enum->pointer for data > in the ID table > > On Sat, Aug 12, 2023 at 03:31:00PM +0100, Biju Das wrote: > > Convert enum->pointer for data in the ID table, so that > > device_get_match_data() can do match against OF/ACPI/I2C tables, once > > i2c bus type match support added to it. > > > > Replace enum->struct *mma_chip_info for data in the ID table and > > simplify > > mma8452_probe() by replacing device_get_match_data() with > > i2c_get_match_data(). > > ... > > > static const struct i2c_device_id mma8452_id[] = { > > - { "mma8451", mma8451 }, > > - { "mma8452", mma8452 }, > > - { "mma8453", mma8453 }, > > - { "mma8652", mma8652 }, > > - { "mma8653", mma8653 }, > > - { "fxls8471", fxls8471 }, > > + { "mma8451", (kernel_ulong_t)&mma_chip_info_table[mma8451] }, > > + { "mma8452", (kernel_ulong_t)&mma_chip_info_table[mma8452] }, > > + { "mma8453", (kernel_ulong_t)&mma_chip_info_table[mma8453] }, > > + { "mma8652", (kernel_ulong_t)&mma_chip_info_table[mma8652] }, > > + { "mma8653", (kernel_ulong_t)&mma_chip_info_table[mma8653] }, > > + { "fxls8471", (kernel_ulong_t)&mma_chip_info_table[fxls8471] }, > > You can also keep it sorted by name. OK will sort by name. Cheers, Biju