On Sat, Aug 26, 2023 at 07:19:09PM +0100, Biju Das wrote: > Convert enum->pointer for data in the match tables, so that the hw > differences can be stored in pointer and there by simpily the code. > > Add struct ltc3589_info for hw differences between the devices and replace > ltc3589_variant->ltc3589_info for data in the match table. Simplify the > probe() by replacing of_device_get_match_data() and ID lookup for > retrieving data by i2c_get_match_data(). Drop enum ltc3589_variant and > variant from struct ltc3589_info as there are no users. ... > +struct ltc3589_info { > + int fixed_uV; > + const unsigned int *volt_table; > +}; Can it consume less bytes on some architectures if you swap the order? ... > { } > }; > MODULE_DEVICE_TABLE(i2c, ltc3589_i2c_id); > { }, Yeah, a side note about trailing comma in the terminator entries... > }; > MODULE_DEVICE_TABLE(of, ltc3589_of_match); -- With Best Regards, Andy Shevchenko