On 01/12/2020 19:21, Andy Shevchenko wrote: > On Tue, Dec 01, 2020 at 09:06:38PM +0200, Laurent Pinchart wrote: >> On Tue, Dec 01, 2020 at 09:05:23PM +0200, Andy Shevchenko wrote: >>> On Tue, Dec 01, 2020 at 08:55:48PM +0200, Laurent Pinchart wrote: >>> >>>> Do you think the Windows driver would use DMI ? >>> Linux is using DMI for quirks. >>> >>>> That seems quite >>>> unlikely to me, given how they would have to release a new driver binary >>>> for every machine. I'm pretty sure that a different mechanism is used to >>>> identify camera integration, and I think it would make sense to follow >>>> the same approach. That would allow us to avoid large tables of DMI >>>> identifiers that would need to be constently updated, potentially making >>>> user experience better. >>> All Surface family can be matched in a way as Apple machines [1]. >>> >>> [1]: https://lkml.org/lkml/2020/4/15/1198 >> But not all Surface machines necessarily have the same camera >> architecture. My point is that there seems to be identifiers reported in >> ACPI for the exact purpose of identifying the camera architecture. If we >> used DMI instead, we would have to handle each machine individually. > With help of DMI we may narrow down the search. > > But again, we are talking about uncertainity. It may be your way (a lot of > platforms that have different settings), or mine (only a few with more or less > standard sets of settings). > > DMI is simply standard in Linux (people usually easier can grep for quirks for > a specific platform). > > I would rather ask Hans' opinion since he has quite an expertise with DMI for > good and bad. > I have no real preference as to the current method or DMI, but thoughts that come to mind are: 1. given your info that low byte 0x0c means clock enable, we need to register a clock too. Do we need to extend this device specific section to map a clock name, or is it acceptable for them to be nameless (ISTR that the API will let you fetch a clock using devm_clock_get(dev, NULL);) 2. Given only 0x0b pin is actually a regulator and it's controlling multiple devices, my plan when we got round to adding the VCM / EEPROM support was simply to extend those mapping tables so that those supplementary devices were also able to get that regulator...and the two would share it. I think, from reading the regulator code and documentation, that that's all fine - and it won't actually be disabled until both drivers disable it. Does that sound about right?