On Tue, Mar 31, 2009 at 07:37:55PM +0100, Russell King - ARM Linux wrote:
I don't think this is the complete story. Sometime between 2.6.27 and 2.6.29, the structure below /sys/devices/platform/soc-audio changed (the ac97 codec moved to the top level.)
I've reproduced and fixed this for the ASoC native driver case (patch below); looking at the code and history I can't immediately see how this ever worked properly - the parent appears to have been NULL ever since ASoC was merged into mainline. I can't reproduce this for the ac97.c case, the code looks correct and the behaviour at runtime also appears correct in my tests.
I also haven't manage to reproduce the ordering issues with the register writes with or without my fixes so I can't be 100% confident that this will fix the problem you're seeing. If you could post your machine driver that'd be helpful.
I'm not sure where wm9705-ts currently appears in the device tree (I need to resume the device, and sort out its resume quirks so that I can see the sysfs layout... but I'm absolutely sure that the ac97 device appears at /sys/devices/platform/ which is definitely wrong.
Note that there *is* a device for the AC97 controller visible in the device tree but that currently it plays no role in suspend and resume when ASoC is being used, it exists only to tell ASoC that the AC97 device has probed. Hopefully by 2.6.31 there will be internal synchronisation within ASoC to do the suspend and resume of the entire ASoC card over multiple parent buses when the first and last component get called.