On Wed, Aug 16, 2023 at 10:16:00AM +0200, Geert Uytterhoeven wrote: > On Tue, Aug 15, 2023 at 6:50 PM Andy Shevchenko > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > > On Tue, Aug 15, 2023 at 09:29:06AM +0200, Geert Uytterhoeven wrote: > > > On Tue, Aug 15, 2023 at 9:19 AM Andy Shevchenko > > > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > > > > On Sat, Aug 12, 2023 at 10:04:18AM +0100, Biju Das wrote: ... > > > > > + {.compatible = "ti,dac5571", .data = &dac5571_spec[single_8bit] }, > > > > > + {.compatible = "ti,dac6571", .data = &dac5571_spec[single_10bit] }, > > > > > + {.compatible = "ti,dac7571", .data = &dac5571_spec[single_12bit] }, > > > > > + {.compatible = "ti,dac5574", .data = &dac5571_spec[quad_8bit] }, > > > > > + {.compatible = "ti,dac6574", .data = &dac5571_spec[quad_10bit] }, > > > > > + {.compatible = "ti,dac7574", .data = &dac5571_spec[quad_12bit] }, > > > > > + {.compatible = "ti,dac5573", .data = &dac5571_spec[quad_8bit] }, > > > > > + {.compatible = "ti,dac6573", .data = &dac5571_spec[quad_10bit] }, > > > > > + {.compatible = "ti,dac7573", .data = &dac5571_spec[quad_12bit] }, > > > > > + {.compatible = "ti,dac121c081", .data = &dac5571_spec[single_12bit] }, > > > > > > > > I would reorder them a bit. > > > > > > Which is safe in this particular case... > > > But not in general, as there might be fall-back compatible values. > > > > You mean the OF ID list must be specifically ordered?! What a nice minefield! > > This has to be fixed somewhere else, surely. > > Seems like it is, cfr. the scoring system in drivers/of/base.c > __of_device_is_compatible(). Sorry for the confusion. > > I still tend to order them in match tables though, from most-specific > to least-specific. > > Note that soc_device_match() (which is used less, fortunately) does > not have such a scoring system, so order does matter there. Should be fixed there, because it's a big downside of OF. -- With Best Regards, Andy Shevchenko