* [RFC PATCH] ASoC: Samsung: Register the audio dma platform device
@ 2012-11-14 12:09 Padmavathi Venna
2012-11-14 12:09 ` [RFC PATCH] ASoC: Samsung: Register the audio " Padmavathi Venna
2012-11-23 11:31 ` [RFC PATCH] ASoC: Samsung: Register the audio dma " Padma Venkat
0 siblings, 2 replies; 6+ messages in thread
From: Padmavathi Venna @ 2012-11-14 12:09 UTC (permalink / raw)
To: linux-arm-kernel
Audio dma device is not a hardware peripherial.
So this device can't be added in the dt devices list.
So expanded the module_platform_driver and registered
this device using "platform_device_register_simple".
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
---
sound/soc/samsung/dma.c | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c
index 359708c..17ae9c0 100644
--- a/sound/soc/samsung/dma.c
+++ b/sound/soc/samsung/dma.c
@@ -444,6 +444,8 @@ static int __devexit samsung_asoc_platform_remove(struct platform_device *pdev)
return 0;
}
+static struct platform_device *asoc_dma_device;
+
static struct platform_driver asoc_dma_driver = {
.driver = {
.name = "samsung-audio",
@@ -454,7 +456,33 @@ static struct platform_driver asoc_dma_driver = {
.remove = __devexit_p(samsung_asoc_platform_remove),
};
-module_platform_driver(asoc_dma_driver);
+static int __init asoc_dma_init(void)
+{
+ int ret;
+
+ ret = platform_driver_register(&asoc_dma_driver);
+ if (ret) {
+ pr_err("unable to register driver\n");
+ return ret;
+ }
+
+ asoc_dma_device = platform_device_register_simple("samsung-audio", -1, NULL, 0);
+ if (IS_ERR(asoc_dma_device)) {
+ platform_driver_unregister(&asoc_dma_driver);
+ return PTR_ERR(asoc_dma_device);
+ }
+
+ return 0;
+}
+
+static void __exit asoc_dma_exit(void)
+{
+ platform_device_unregister(asoc_dma_device);
+ platform_driver_unregister(&asoc_dma_driver);
+}
+
+module_init(asoc_dma_init);
+module_exit(asoc_dma_exit);
MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
MODULE_DESCRIPTION("Samsung ASoC DMA Driver");
--
1.7.4.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [RFC PATCH] ASoC: Samsung: Register the audio platform device
2012-11-14 12:09 [RFC PATCH] ASoC: Samsung: Register the audio dma platform device Padmavathi Venna
@ 2012-11-14 12:09 ` Padmavathi Venna
2012-11-23 11:31 ` Padma Venkat
2012-11-26 14:45 ` Padma Venkat
2012-11-23 11:31 ` [RFC PATCH] ASoC: Samsung: Register the audio dma " Padma Venkat
1 sibling, 2 replies; 6+ messages in thread
From: Padmavathi Venna @ 2012-11-14 12:09 UTC (permalink / raw)
To: linux-arm-kernel
Audio platform device is not a hardware peripherial.
So this device can't be added in the dt devices list.
So expanded the module_platform_driver and registered
this device using "platform_device_register_simple".
Also added the soc-core pm ops structure in the audio
platform driver.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
---
sound/soc/samsung/smdk_wm8994.c | 31 ++++++++++++++++++++++++++++++-
1 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
index 48dd4dd..7f97969 100644
--- a/sound/soc/samsung/smdk_wm8994.c
+++ b/sound/soc/samsung/smdk_wm8994.c
@@ -173,16 +173,45 @@ static int __devexit smdk_audio_remove(struct platform_device *pdev)
return 0;
}
+static struct platform_device *smdk_audio_device;
+
static struct platform_driver smdk_audio_driver = {
.driver = {
.name = "smdk-audio",
.owner = THIS_MODULE,
+ .pm = &snd_soc_pm_ops,
},
.probe = smdk_audio_probe,
.remove = __devexit_p(smdk_audio_remove),
};
-module_platform_driver(smdk_audio_driver);
+static int __init smdk_audio_init(void)
+{
+ int ret;
+
+ ret = platform_driver_register(&smdk_audio_driver);
+ if (ret) {
+ pr_err("unable to register driver\n");
+ return ret;
+ }
+
+ smdk_audio_device = platform_device_register_simple("smdk-audio", -1, NULL, 0);
+ if (IS_ERR(smdk_audio_device)) {
+ platform_driver_unregister(&smdk_audio_driver);
+ return PTR_ERR(smdk_audio_device);
+ }
+
+ return 0;
+}
+
+static void __exit smdk_audio_exit(void)
+{
+ platform_device_unregister(smdk_audio_device);
+ platform_driver_unregister(&smdk_audio_driver);
+}
+
+module_init(smdk_audio_init);
+module_exit(smdk_audio_exit);
MODULE_DESCRIPTION("ALSA SoC SMDK WM8994");
MODULE_LICENSE("GPL");
--
1.7.4.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [RFC PATCH] ASoC: Samsung: Register the audio platform device
2012-11-14 12:09 ` [RFC PATCH] ASoC: Samsung: Register the audio " Padmavathi Venna
@ 2012-11-23 11:31 ` Padma Venkat
2012-11-26 14:45 ` Padma Venkat
1 sibling, 0 replies; 6+ messages in thread
From: Padma Venkat @ 2012-11-23 11:31 UTC (permalink / raw)
To: linux-arm-kernel
cc'ing Mark Brown
On Wed, Nov 14, 2012 at 5:39 PM, Padmavathi Venna <padma.v@samsung.com> wrote:
> Audio platform device is not a hardware peripherial.
> So this device can't be added in the dt devices list.
> So expanded the module_platform_driver and registered
> this device using "platform_device_register_simple".
>
> Also added the soc-core pm ops structure in the audio
> platform driver.
>
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
> ---
> sound/soc/samsung/smdk_wm8994.c | 31 ++++++++++++++++++++++++++++++-
> 1 files changed, 30 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
> index 48dd4dd..7f97969 100644
> --- a/sound/soc/samsung/smdk_wm8994.c
> +++ b/sound/soc/samsung/smdk_wm8994.c
> @@ -173,16 +173,45 @@ static int __devexit smdk_audio_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static struct platform_device *smdk_audio_device;
> +
> static struct platform_driver smdk_audio_driver = {
> .driver = {
> .name = "smdk-audio",
> .owner = THIS_MODULE,
> + .pm = &snd_soc_pm_ops,
> },
> .probe = smdk_audio_probe,
> .remove = __devexit_p(smdk_audio_remove),
> };
>
> -module_platform_driver(smdk_audio_driver);
> +static int __init smdk_audio_init(void)
> +{
> + int ret;
> +
> + ret = platform_driver_register(&smdk_audio_driver);
> + if (ret) {
> + pr_err("unable to register driver\n");
> + return ret;
> + }
> +
> + smdk_audio_device = platform_device_register_simple("smdk-audio", -1, NULL, 0);
> + if (IS_ERR(smdk_audio_device)) {
> + platform_driver_unregister(&smdk_audio_driver);
> + return PTR_ERR(smdk_audio_device);
> + }
> +
> + return 0;
> +}
> +
> +static void __exit smdk_audio_exit(void)
> +{
> + platform_device_unregister(smdk_audio_device);
> + platform_driver_unregister(&smdk_audio_driver);
> +}
> +
> +module_init(smdk_audio_init);
> +module_exit(smdk_audio_exit);
>
> MODULE_DESCRIPTION("ALSA SoC SMDK WM8994");
> MODULE_LICENSE("GPL");
> --
> 1.7.4.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread* [RFC PATCH] ASoC: Samsung: Register the audio platform device
2012-11-14 12:09 ` [RFC PATCH] ASoC: Samsung: Register the audio " Padmavathi Venna
2012-11-23 11:31 ` Padma Venkat
@ 2012-11-26 14:45 ` Padma Venkat
2012-11-26 14:49 ` Mark Brown
1 sibling, 1 reply; 6+ messages in thread
From: Padma Venkat @ 2012-11-26 14:45 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Wed, Nov 14, 2012 at 5:39 PM, Padmavathi Venna <padma.v@samsung.com> wrote:
> Audio platform device is not a hardware peripherial.
> So this device can't be added in the dt devices list.
> So expanded the module_platform_driver and registered
> this device using "platform_device_register_simple".
>
> Also added the soc-core pm ops structure in the audio
> platform driver.
>
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
> ---
> sound/soc/samsung/smdk_wm8994.c | 31 ++++++++++++++++++++++++++++++-
> 1 files changed, 30 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
> index 48dd4dd..7f97969 100644
> --- a/sound/soc/samsung/smdk_wm8994.c
> +++ b/sound/soc/samsung/smdk_wm8994.c
> @@ -173,16 +173,45 @@ static int __devexit smdk_audio_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static struct platform_device *smdk_audio_device;
> +
> static struct platform_driver smdk_audio_driver = {
> .driver = {
> .name = "smdk-audio",
> .owner = THIS_MODULE,
> + .pm = &snd_soc_pm_ops,
> },
> .probe = smdk_audio_probe,
> .remove = __devexit_p(smdk_audio_remove),
> };
>
> -module_platform_driver(smdk_audio_driver);
> +static int __init smdk_audio_init(void)
> +{
> + int ret;
> +
> + ret = platform_driver_register(&smdk_audio_driver);
> + if (ret) {
> + pr_err("unable to register driver\n");
> + return ret;
> + }
> +
> + smdk_audio_device = platform_device_register_simple("smdk-audio", -1, NULL, 0);
> + if (IS_ERR(smdk_audio_device)) {
> + platform_driver_unregister(&smdk_audio_driver);
> + return PTR_ERR(smdk_audio_device);
> + }
> +
> + return 0;
> +}
> +
> +static void __exit smdk_audio_exit(void)
> +{
> + platform_device_unregister(smdk_audio_device);
> + platform_driver_unregister(&smdk_audio_driver);
> +}
> +
> +module_init(smdk_audio_init);
> +module_exit(smdk_audio_exit);
Ping. Any comments on this patch?
Thanks
Padma
>
> MODULE_DESCRIPTION("ALSA SoC SMDK WM8994");
> MODULE_LICENSE("GPL");
> --
> 1.7.4.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC PATCH] ASoC: Samsung: Register the audio dma platform device
2012-11-14 12:09 [RFC PATCH] ASoC: Samsung: Register the audio dma platform device Padmavathi Venna
2012-11-14 12:09 ` [RFC PATCH] ASoC: Samsung: Register the audio " Padmavathi Venna
@ 2012-11-23 11:31 ` Padma Venkat
1 sibling, 0 replies; 6+ messages in thread
From: Padma Venkat @ 2012-11-23 11:31 UTC (permalink / raw)
To: linux-arm-kernel
cc'ing Mark Brown
On Wed, Nov 14, 2012 at 5:39 PM, Padmavathi Venna <padma.v@samsung.com> wrote:
> Audio dma device is not a hardware peripherial.
> So this device can't be added in the dt devices list.
> So expanded the module_platform_driver and registered
> this device using "platform_device_register_simple".
>
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
> ---
> sound/soc/samsung/dma.c | 30 +++++++++++++++++++++++++++++-
> 1 files changed, 29 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c
> index 359708c..17ae9c0 100644
> --- a/sound/soc/samsung/dma.c
> +++ b/sound/soc/samsung/dma.c
> @@ -444,6 +444,8 @@ static int __devexit samsung_asoc_platform_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static struct platform_device *asoc_dma_device;
> +
> static struct platform_driver asoc_dma_driver = {
> .driver = {
> .name = "samsung-audio",
> @@ -454,7 +456,33 @@ static struct platform_driver asoc_dma_driver = {
> .remove = __devexit_p(samsung_asoc_platform_remove),
> };
>
> -module_platform_driver(asoc_dma_driver);
> +static int __init asoc_dma_init(void)
> +{
> + int ret;
> +
> + ret = platform_driver_register(&asoc_dma_driver);
> + if (ret) {
> + pr_err("unable to register driver\n");
> + return ret;
> + }
> +
> + asoc_dma_device = platform_device_register_simple("samsung-audio", -1, NULL, 0);
> + if (IS_ERR(asoc_dma_device)) {
> + platform_driver_unregister(&asoc_dma_driver);
> + return PTR_ERR(asoc_dma_device);
> + }
> +
> + return 0;
> +}
> +
> +static void __exit asoc_dma_exit(void)
> +{
> + platform_device_unregister(asoc_dma_device);
> + platform_driver_unregister(&asoc_dma_driver);
> +}
> +
> +module_init(asoc_dma_init);
> +module_exit(asoc_dma_exit);
>
> MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
> MODULE_DESCRIPTION("Samsung ASoC DMA Driver");
> --
> 1.7.4.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-26 14:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14 12:09 [RFC PATCH] ASoC: Samsung: Register the audio dma platform device Padmavathi Venna
2012-11-14 12:09 ` [RFC PATCH] ASoC: Samsung: Register the audio " Padmavathi Venna
2012-11-23 11:31 ` Padma Venkat
2012-11-26 14:45 ` Padma Venkat
2012-11-26 14:49 ` Mark Brown
2012-11-23 11:31 ` [RFC PATCH] ASoC: Samsung: Register the audio dma " Padma Venkat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).