All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup
@ 2011-08-30 11:39 Peter Ujfalusi
  2011-08-30 11:39 ` [PATCH 1/3] ASoC: tpa6130a2: Model support cleanup Peter Ujfalusi
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Peter Ujfalusi @ 2011-08-30 11:39 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, Tony Lindgren
  Cc: alsa-devel, linux-omap, Jarkko Nikula

Hello,

Small cleanup for the tpa6130a2 driver for model handling:
Remove the model_id from platform_data, and use the device name/device_data
to distinguish between the supported models of TPA.

Regards,
Peter
---
Peter Ujfalusi (3):
  ASoC: tpa6130a2: Model support cleanup
  OMAP: RX51: No need to configure the tpa_model
  ASoC: tpa6130a2: Remove model_id from platform data

 arch/arm/mach-omap2/board-rx51-peripherals.c |    1 -
 include/sound/tpa6130a2-plat.h               |    6 ------
 sound/soc/codecs/tpa6130a2.c                 |   12 +++++++++---
 3 files changed, 9 insertions(+), 10 deletions(-)

-- 
1.7.6.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] ASoC: tpa6130a2: Model support cleanup
  2011-08-30 11:39 [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup Peter Ujfalusi
@ 2011-08-30 11:39 ` Peter Ujfalusi
  2011-08-30 11:39 ` [PATCH 2/3] OMAP: RX51: No need to configure the tpa_model Peter Ujfalusi
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Peter Ujfalusi @ 2011-08-30 11:39 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, Tony Lindgren
  Cc: alsa-devel, linux-omap, Jarkko Nikula

Use the device name and driver_data to identify
the TPA model supported by the driver.
Board files should use either "tpa6130a2" or
"tpa6140a2" as device name to specify the model
in used on the specific board.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 sound/soc/codecs/tpa6130a2.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
index 239e0c4..0c0fcb3 100644
--- a/sound/soc/codecs/tpa6130a2.c
+++ b/sound/soc/codecs/tpa6130a2.c
@@ -383,7 +383,7 @@ static int __devinit tpa6130a2_probe(struct i2c_client *client,
 
 	pdata = client->dev.platform_data;
 	data->power_gpio = pdata->power_gpio;
-	data->id = pdata->id;
+	data->id = id->driver_data;
 
 	mutex_init(&data->mutex);
 
@@ -405,7 +405,7 @@ static int __devinit tpa6130a2_probe(struct i2c_client *client,
 	switch (data->id) {
 	default:
 		dev_warn(dev, "Unknown TPA model (%d). Assuming 6130A2\n",
-			 pdata->id);
+			 data->id);
 	case TPA6130A2:
 		regulator = "Vdd";
 		break;
@@ -470,7 +470,8 @@ static int __devexit tpa6130a2_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tpa6130a2_id[] = {
-	{ "tpa6130a2", 0 },
+	{ "tpa6130a2", TPA6130A2 },
+	{ "tpa6140a2", TPA6140A2 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tpa6130a2_id);
-- 
1.7.6.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] OMAP: RX51: No need to configure the tpa_model
  2011-08-30 11:39 [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup Peter Ujfalusi
  2011-08-30 11:39 ` [PATCH 1/3] ASoC: tpa6130a2: Model support cleanup Peter Ujfalusi
@ 2011-08-30 11:39 ` Peter Ujfalusi
  2011-08-30 11:39 ` [PATCH 3/3] ASoC: tpa6130a2: Remove model_id from platform data Peter Ujfalusi
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Peter Ujfalusi @ 2011-08-30 11:39 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, Tony Lindgren
  Cc: alsa-devel, linux-omap, Jarkko Nikula

The TPA driver now uses the name for model support.
n900 has tpa61030a2 model of TPA.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 5a886cd..ba1aa07 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -900,7 +900,6 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
 };
 
 static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata_or_module = {
-	.id			= TPA6130A2,
 	.power_gpio		= 98,
 };
 
-- 
1.7.6.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] ASoC: tpa6130a2: Remove model_id from platform data
  2011-08-30 11:39 [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup Peter Ujfalusi
  2011-08-30 11:39 ` [PATCH 1/3] ASoC: tpa6130a2: Model support cleanup Peter Ujfalusi
  2011-08-30 11:39 ` [PATCH 2/3] OMAP: RX51: No need to configure the tpa_model Peter Ujfalusi
@ 2011-08-30 11:39 ` Peter Ujfalusi
  2011-08-30 13:38 ` [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup Jarkko Nikula
  2011-09-13 12:11 ` [alsa-devel] " Péter Ujfalusi
  4 siblings, 0 replies; 9+ messages in thread
From: Peter Ujfalusi @ 2011-08-30 11:39 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, Tony Lindgren
  Cc: alsa-devel, linux-omap, Jarkko Nikula

The model_id is no longer needed within the platform_data
for the TPA driver since the model of TPA specified
with the device name (tpa6130a2/tpa6140a2).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 include/sound/tpa6130a2-plat.h |    6 ------
 sound/soc/codecs/tpa6130a2.c   |    5 +++++
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/sound/tpa6130a2-plat.h b/include/sound/tpa6130a2-plat.h
index 89beccb..4cc1093 100644
--- a/include/sound/tpa6130a2-plat.h
+++ b/include/sound/tpa6130a2-plat.h
@@ -23,13 +23,7 @@
 #ifndef TPA6130A2_PLAT_H
 #define TPA6130A2_PLAT_H
 
-enum tpa_model {
-	TPA6130A2,
-	TPA6140A2,
-};
-
 struct tpa6130a2_platform_data {
-	enum tpa_model id;
 	int power_gpio;
 };
 
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
index 0c0fcb3..f37a02b 100644
--- a/sound/soc/codecs/tpa6130a2.c
+++ b/sound/soc/codecs/tpa6130a2.c
@@ -33,6 +33,11 @@
 
 #include "tpa6130a2.h"
 
+enum tpa_model {
+	TPA6130A2,
+	TPA6140A2,
+};
+
 static struct i2c_client *tpa6130a2_client;
 
 /* This struct is used to save the context */
-- 
1.7.6.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup
  2011-08-30 11:39 [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup Peter Ujfalusi
                   ` (2 preceding siblings ...)
  2011-08-30 11:39 ` [PATCH 3/3] ASoC: tpa6130a2: Remove model_id from platform data Peter Ujfalusi
@ 2011-08-30 13:38 ` Jarkko Nikula
  2011-09-21 15:03   ` Mark Brown
  2011-09-13 12:11 ` [alsa-devel] " Péter Ujfalusi
  4 siblings, 1 reply; 9+ messages in thread
From: Jarkko Nikula @ 2011-08-30 13:38 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: Mark Brown, Liam Girdwood, Tony Lindgren, alsa-devel, linux-omap

On 08/30/2011 02:39 PM, Peter Ujfalusi wrote:
> Hello,
>
> Small cleanup for the tpa6130a2 driver for model handling:
> Remove the model_id from platform_data, and use the device name/device_data
> to distinguish between the supported models of TPA.
>
> Regards,
> Peter
> ---
> Peter Ujfalusi (3):
>    ASoC: tpa6130a2: Model support cleanup
>    OMAP: RX51: No need to configure the tpa_model
>    ASoC: tpa6130a2: Remove model_id from platform data
>
>   arch/arm/mach-omap2/board-rx51-peripherals.c |    1 -
>   include/sound/tpa6130a2-plat.h               |    6 ------
>   sound/soc/codecs/tpa6130a2.c                 |   12 +++++++++---
>   3 files changed, 9 insertions(+), 10 deletions(-)
Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-devel] [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup
  2011-08-30 11:39 [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup Peter Ujfalusi
                   ` (3 preceding siblings ...)
  2011-08-30 13:38 ` [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup Jarkko Nikula
@ 2011-09-13 12:11 ` Péter Ujfalusi
  2011-09-13 12:27   ` Mark Brown
  4 siblings, 1 reply; 9+ messages in thread
From: Péter Ujfalusi @ 2011-09-13 12:11 UTC (permalink / raw)
  To: alsa-devel
  Cc: Mark Brown, Girdwood, Liam, Tony Lindgren, linux-omap, Jarkko Nikula

Hello Mark, Tony,

On Tuesday 30 August 2011 13:39:51 Ujfalusi, Peter wrote:
> Hello,
> 
> Small cleanup for the tpa6130a2 driver for model handling:
> Remove the model_id from platform_data, and use the device name/device_data
> to distinguish between the supported models of TPA.

Would you have time to take a look at this series (it got the Tested-by from 
Jarkko)?

Thank you,
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-devel] [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup
  2011-09-13 12:11 ` [alsa-devel] " Péter Ujfalusi
@ 2011-09-13 12:27   ` Mark Brown
  2011-09-13 14:53     ` Liam Girdwood
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2011-09-13 12:27 UTC (permalink / raw)
  To: Péter Ujfalusi
  Cc: alsa-devel, Girdwood, Liam, Tony Lindgren, linux-omap, Jarkko Nikula

On Tue, Sep 13, 2011 at 03:11:41PM +0300, Péter Ujfalusi wrote:

> Would you have time to take a look at this series (it got the Tested-by from 
> Jarkko)?

I'm fine with it, I'm waiting for Liam's review.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-devel] [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup
  2011-09-13 12:27   ` Mark Brown
@ 2011-09-13 14:53     ` Liam Girdwood
  0 siblings, 0 replies; 9+ messages in thread
From: Liam Girdwood @ 2011-09-13 14:53 UTC (permalink / raw)
  To: Mark Brown
  Cc: Péter Ujfalusi, alsa-devel, Tony Lindgren, linux-omap,
	Jarkko Nikula

On Tue, 2011-09-13 at 13:27 +0100, Mark Brown wrote:
> On Tue, Sep 13, 2011 at 03:11:41PM +0300, Péter Ujfalusi wrote:
> 
> > Would you have time to take a look at this series (it got the Tested-by from 
> > Jarkko)?
> 
> I'm fine with it, I'm waiting for Liam's review.

Acked-by: Liam Girdwood <lrg@ti.com>


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup
  2011-08-30 13:38 ` [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup Jarkko Nikula
@ 2011-09-21 15:03   ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2011-09-21 15:03 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: Peter Ujfalusi, Tony Lindgren, alsa-devel, linux-omap, Liam Girdwood

On Tue, Aug 30, 2011 at 04:38:50PM +0300, Jarkko Nikula wrote:

> Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com>

I applied these with the last two patches squashed together in order to
preserve bisection - the two patches should have been combined as patch
2 removes a field that the existing code is using.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-09-21 15:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-30 11:39 [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup Peter Ujfalusi
2011-08-30 11:39 ` [PATCH 1/3] ASoC: tpa6130a2: Model support cleanup Peter Ujfalusi
2011-08-30 11:39 ` [PATCH 2/3] OMAP: RX51: No need to configure the tpa_model Peter Ujfalusi
2011-08-30 11:39 ` [PATCH 3/3] ASoC: tpa6130a2: Remove model_id from platform data Peter Ujfalusi
2011-08-30 13:38 ` [PATCH 0/3] ASoC: tpa6130a2: model handling cleanup Jarkko Nikula
2011-09-21 15:03   ` Mark Brown
2011-09-13 12:11 ` [alsa-devel] " Péter Ujfalusi
2011-09-13 12:27   ` Mark Brown
2011-09-13 14:53     ` Liam Girdwood

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.