On Wed, Jun 11, 2008 at 07:54:06PM +0100, Andy Green wrote: > I took your advice on the nits and attach a new version of the patch. > Thanks a lot for your hints.
On the way home I realised that the suspend should wait for the card to be in D0 before it does anything otherwise a resume followed rapidly by suspend could get confused and try to simulteneously suspend and resume the ASoC subsystem, which would be messy. That ought to be straightforward for me to add on if you don't have a chance to look at this before tomorrow. > I had one more realization a bit late in the day, on GTA02 Codec digital > side is "always on", only the analogue power is switched off in suspend. > ~ In this scenario, the regs will probably not need any reload on resume > at all. But I couldn't even see where all this fits into the > mach-gta02.c world, I guess it doesn't matter now if there will be a > general deferred resume reload of them all anyway. That did cross our minds when I talked this over with Liam earlier. The registers should be preserved if you only kill the analogue supplies so yes, the cache writeback should be avoidable. All it needs is a hook in the codec driver to let the machine driver set a flag in the codec driver telling it that the chip isn't going to get powered down. This could either be a function exported by the WM8753 driver or added to the standard codec ops with a function in the core. Off the top of my head I'm tending towards a generic hook.
