On 2021-12-16 4:13 PM, Pierre-Louis Bossart wrote:
...
I don't really see the point about the number of fields, this is a generic descriptor used for I2S/SoundWire devices so mechanically there are things are are not used in all platforms.
Another example is the quirks field, it's only meant to be used when there's actually a quirk.
Note that I am planning to remove the sof_fw_filename field since it's redundant with what is part of the PCI descriptor, but the topology will remain there: it has to match with the machine driver.
That's why no new struct is declared. Simply the tables are moved locally, and there is nothing wrong with that. Cohesiveness and readability outweighs the duplication of ACPI _HID.
After thinking about this again, perhaps in the future, this generic descriptor should be split into more specific bits e.g.: like the struct pci_driver which wraps struct driver.
i2s_mach = { // some i2s-specific fields e.g.: .acpi-id = XXX, .mach = { // some generic fields e.g.: .drv_name = "a machine board name", }, };
Regards, Czarek