Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45878 )
Change subject: tigerlake mainboards: switch to devtree aliases for PMC MUX connectors ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45878/6/src/mainboard/google/voltee... File src/mainboard/google/volteer/mainboard.c:
https://review.coreboot.org/c/coreboot/+/45878/6/src/mainboard/google/voltee... PS6, Line 23: dev->path.generic.id == 1;
Sure could, but those checks are so, how shall we say, inelegant 😄?
Agreed. Ideally we should be solving this at the sconfig/devicetree level rather than having to check at runtime.
There's got to be a better way to establish device "identity" than a `void *`...
Currently, the only way to ensure that you are inspecting the right structure is looking at the device->chip_ops. That gives us some confidence that future changes to the hierarchy won't silently change bits in an unrelated structure.
or maybe a new bus type "virtual" or similar
That would run into the same problem. In this case, you can restrict to using virtual only for pmc_mux, but we might run into similar problem with other device/buses as well.