[PATCH 4/4] introduce-gta02-beachhead.patch

Mark Brown broonie at opensource.wolfsonmicro.com
Sun Feb 22 13:45:18 CET 2009

On Sun, Feb 22, 2009 at 07:58:34AM +0800, Andy Green wrote:
> Somebody in the thread at some point said:

> | You were trying to do it without any cooperation from the rest of the
> | kernel which made everything racy IIRC.

> Well, "I" did not write any of that existing code, I just run around

Sorry, I wasn't clear - I meant you as in OpenMoko rather than you

> trying to keep it working on rebases and this area changed.  I referred
> to other implementations in the Alsa SoC tree to try to see what was
> expected, but I was unable to get it to work without doing what we do
> now.  Since I don't have the luxury of dealing with just one domain
> blowing chunks, that was and has been good enough.

The way it has been supposed to work up until very recently is the way
you've got it at the minute with the I2C device and driver both being
registered in wm8753_i2c_add_device().  ASoC needed the entire card,
including the codec, to appear at once.  I suspect the problems you were
running into were due to the change you used to have where the codec
device was registered under arch/arm (which can now be supported in ASoC
but wasn't possible to do safely up until 2.6.29).

> But I noticed wm8753 gta02 implementation has always done registration
> stuff in its driver init function  more commonly done in the device end
> which is going to be racy, but as I say that's not my code.

Indeed - like I say, it's the standard ASoC driver model.

The general idea with ASoC is that you should never need to carry a diff
outside of your machine driver - that's where all the board-specific
customisation you might need to do should go.

More information about the openmoko-kernel mailing list