On 7/23/08, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
On Tue, Jul 22, 2008 at 07:53:51PM -0400, Jon Smirl wrote:
Allow a custom ASOC machine driver with soc-of-simple
As with the clocking configuration: this looks fine from an ASoC point of view but please fix the checkpatch warnings. However...
/* Only register the device if both the codec and platform have * been registered */
if ((!of_soc->device.codec_data) || (!of_soc->platform_node))
if ((!of_soc->device.codec_data) || (!of_soc->platform_node) || !machine_name) return;
...this doesn't just allow a custom machine driver, it requires that something configures at least the machine name. That's not a problem from the ASoC point of view but possibly from the PowerPC side?
You have to configure at least the name. Otherwise if the machine driver is the last to register, how do you know to hold off the final registration and wait for the machine driver to appear?
Or is it ok for me to change these after the platform device has been created? of_soc->dai_link.ops = machine_ops; of_soc->machine.name = machine_name;
I have to have the machine driver in order to control my external clock chips.