* platform driver clarification in twl6040 codec driver
@ 2011-05-05 5:58 preetam
0 siblings, 0 replies; only message in thread
From: preetam @ 2011-05-05 5:58 UTC (permalink / raw)
To: alsa-devel
Hai,
I am building an ALSA ASoC driver based on the original twl6040 driver
on omap 4 panda board. I notice that there is a platform_device being
created in the machine driver which is getting bound to the
platform_driver created by the alsa soc core. i.e "soc-audio".
sound/soc/omap/sd4430.c
================
sdp4430_snd_device = platform_device_alloc("soc-audio", -1);
if (!sdp4430_snd_device) {
printk(KERN_ERR "Platform device allocation failed\n");
return -ENOMEM;
}
snd_soc_register_dais(&sdp4430_snd_device->dev, dai, ARRAY_SIZE(dai));
platform_set_drvdata(sdp4430_snd_device, &snd_soc_sdp4430);
ret = platform_device_add(sdp4430_snd_device);
soc-core.c
======
static struct platform_driver soc_driver = {
.driver = {
.name = "soc-audio",
.owner = THIS_MODULE,
.pm = &soc_pm_ops,
},
.probe = soc_probe,
.remove = soc_remove,
};
However, I fail to understand, how the platform_driver in the twl6040.c
file gets bound and who calls its probe.
sound/soc/codecs/twl6040.c
=================
static struct platform_driver twl6040_codec_driver = {
.driver = {
.name = "twl6040-codec",
.owner = THIS_MODULE,
},
.probe = twl6040_codec_probe,
.remove = __devexit_p(twl6040_codec_remove),
};
I have used the same model for my codec device driver and the probe
function in the codec driver under platform_driver never gets invoked.
Can anyone give me a clarification on this?
Regards,
Preetam
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-05 5:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-05 5:58 platform driver clarification in twl6040 codec driver preetam
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.