14 Feb
2014
14 Feb
'14
6:47 p.m.
Hi,
I'm working on an system with an HDMI codec on an HDA interface, but that interface doesn't use PCI. I want to re-use as much of the code as possible, but I want to avoid scattering ifdefs all over hda_intel.c.
Would gathering the pci specific functions from hda_intel.c into an interface struct of some kind make sense? If azx was probed from pci, then a pci interface would be used, if it was a platform driver, then the correct interface for the platform would be used. It would add some overhead to operations such as azx_writel, but that would be measured to make sure it isn't detrimental to performance.
Any other ideas on how to approach this?
Thanks,
Dylan