[alsa-devel] Porting codec driver to DT
Hi!
We're using the adau17x1 codecs in our products. They currently rely on platform_data to provide information such as mic bias voltage, jack detection and a few other hardware-specific parameters. As we want to move to DT while still having support for the old platform_data way of providing HW-specific information, this makes things a bit more complicated.
There are a few enums declared in <linux/platform_data/adau17x1.h> which are used by the codec driver to distunguish between different configurations. I'd like to use/provide these values in my .dts-file as well, but that would mean either duplicating the definitions, or including DT-specific parts in platform_data or vice versa. What would the Proper (TM) way of implementing support for both be? I've peeked on other drivers but it hasn't helped a lot.
At the moment I'm considering the solution of having a second set of definitions in the DT path with slightly different names, and then change the codec driver to use these definitions instead. If platform_data is provided, there'll be some translation logic at probing time.
Any suggestions? /Andreas
participants (1)
-
Andreas Irestål