From 5e901b37e4a8a305542ad3a776bce997efd7e5e9 Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Thu, 9 Apr 2009 14:07:27 +0800 Subject: [ARM] pxa/magician: remove un-necessary #include of pxa-regs.h and hardware.h Signed-off-by: Eric Miao Cc: Philipp Zabel Cc: Mark Brown --- sound/soc/pxa/magician.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index f7c4544f785..0625c342a1c 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c @@ -27,8 +27,6 @@ #include #include -#include -#include #include #include #include "../codecs/uda1380.h" -- cgit v1.2.3 From eae17754ab1ffc88190ebcbd33b6bec79e6e559a Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Mon, 13 Apr 2009 11:48:03 +0100 Subject: [ARM] pxa: merge AC97 platform data structures Currently there are two possible platform datas for the PXA AC97 driver: one supported by the generic AC97 driver only which provides callbacks to allow board-specific configuration at stream startup and teardown, and another for pxa2xx-ac97-lib which allows configuration of the reset GPIO for PXA2xx CPUs. Obviously this won't actually work when using the generic AC97 driver since the drivers will attempt to parse the platform data in both formats. Fix this by merging the two structures. Signed-off-by: Mark Brown Acked-by: Robert Jarzmik Cc: Marek Vasut Signed-off-by: Eric Miao --- sound/arm/pxa2xx-ac97-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index 0afd1a8226f..a2c12d105c9 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c @@ -364,7 +364,7 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_resume); int __devinit pxa2xx_ac97_hw_probe(struct platform_device *dev) { int ret; - struct pxa2xx_ac97_platform_data *pdata = dev->dev.platform_data; + pxa2xx_audio_ops_t *pdata = dev->dev.platform_data; if (pdata) { switch (pdata->reset_gpio) { -- cgit v1.2.3 From e91fb9137dd235ab959d7675d0e4104974dad5eb Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 17 Apr 2009 11:37:35 +0200 Subject: [ARM] pxa/palm27x: General fix for Palm27x aSoC driver Firstly, this patch makes the palm27x asoc driver a little more sane. Also, since all affected devices use GPIO95 as AC97_nRESET, this patch sets that properly. Affected are PalmT5, TX and LifeDrive. Signed-off-by: Marek Vasut Signed-off-by: Eric Miao --- sound/soc/pxa/palm27x.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'sound') diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c index 48a73f64500..44fcc4e01e0 100644 --- a/sound/soc/pxa/palm27x.c +++ b/sound/soc/pxa/palm27x.c @@ -200,7 +200,7 @@ static struct snd_soc_device palm27x_snd_devdata = { static struct platform_device *palm27x_snd_device; -static int __init palm27x_asoc_init(void) +static int palm27x_asoc_probe(struct platform_device *pdev) { int ret; @@ -208,6 +208,10 @@ static int __init palm27x_asoc_init(void) machine_is_palmld())) return -ENODEV; + if (pdev->dev.platform_data) + palm27x_ep_gpio = ((struct palm27x_asoc_info *) + (pdev->dev.platform_data))->jack_gpio; + ret = gpio_request(palm27x_ep_gpio, "Headphone Jack"); if (ret) return ret; @@ -245,16 +249,31 @@ err_alloc: return ret; } -static void __exit palm27x_asoc_exit(void) +static int __devexit palm27x_asoc_remove(struct platform_device *pdev) { free_irq(gpio_to_irq(palm27x_ep_gpio), NULL); gpio_free(palm27x_ep_gpio); platform_device_unregister(palm27x_snd_device); + return 0; } -void __init palm27x_asoc_set_pdata(struct palm27x_asoc_info *data) +static struct platform_driver palm27x_wm9712_driver = { + .probe = palm27x_asoc_probe, + .remove = __devexit_p(palm27x_asoc_remove), + .driver = { + .name = "palm27x-asoc", + .owner = THIS_MODULE, + }, +}; + +static int __init palm27x_asoc_init(void) +{ + return platform_driver_register(&palm27x_wm9712_driver); +} + +static void __exit palm27x_asoc_exit(void) { - palm27x_ep_gpio = data->jack_gpio; + platform_driver_unregister(&palm27x_wm9712_driver); } module_init(palm27x_asoc_init); -- cgit v1.2.3