Skip to contentSkip to conversation

omap: rx51: Remove __initdata from rx51_tpa6130a2_data

PATCH New Jarkko Nikula 2 participants 6 messages Dec 17, 2010 – Dec 21, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 omap: rx51: Remove __initdata from rx51_tpa6130a2_data

If the TPA6130 is compiled as module the id and power_gpio values are arbitrary at module probing time since the rx51_tpa6130a2_data was marked as __initdata.

---
For 2.6.38 as the TPA6130 is not used in 2.6.37.

---
 arch/arm/mach-omap2/board-rx51-peripherals.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-rx51-peripherals.c +1 -1
index 126b724..cde6847 100644
@@ -719,7 +719,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
 	.vio			= &rx51_vio,
 };
 
-static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata = {
+static struct tpa6130a2_platform_data rx51_tpa6130a2_data = {
 	.id			= TPA6130A2,
 	.power_gpio		= 98,
 };
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 2/3 omap: rx51: Remove extra tlv320aic3x.h inclusion

Remove second tlv320aic3x.h inclusion that came along the commit f0fba2a "ASoC: multi-component - ASoC Multi-Component Support".

---
Clearly for 2.6.38 as harmless issue.

---
 arch/arm/mach-omap2/board-rx51-peripherals.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-rx51-peripherals.c +0 -1
index cde6847..6114e47 100644
@@ -23,7 +23,6 @@
 #include <linux/gpio.h>
 #include <linux/gpio_keys.h>
 #include <linux/mmc/host.h>
-#include <sound/tlv320aic3x.h>
 
 #include <plat/mcspi.h>
 #include <plat/board.h>
Signature · 1 line
1.7.2.3
#2 lore raw

PATCH 3/3 omap: rx51: Add supplies and data for codec b part of TLV320AIC34

In reply to Jarkko Nikula

Upcoming ASoC core and tlv320aic3x changes makes possible to take b part of TLV320AIC34 into use on RX51/N900. Prepare to this by adding virtual supplies and platform data for b part of the codec.

---
 arch/arm/mach-omap2/board-rx51-peripherals.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-rx51-peripherals.c +12 -0
index 6114e47..ca8cecd 100644
@@ -343,6 +343,8 @@ static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
 	/* tlv320aic3x analog supplies */
 	REGULATOR_SUPPLY("AVDD", "2-0018"),
 	REGULATOR_SUPPLY("DRVDD", "2-0018"),
+	REGULATOR_SUPPLY("AVDD", "2-0019"),
+	REGULATOR_SUPPLY("DRVDD", "2-0019"),
 	/* tpa6130a2 */
 	REGULATOR_SUPPLY("Vdd", "2-0060"),
 	/* Keep vmmc as last item. It is not iterated for newer boards */
@@ -353,6 +355,8 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = {
 	/* tlv320aic3x digital supplies */
 	REGULATOR_SUPPLY("IOVDD", "2-0018"),
 	REGULATOR_SUPPLY("DVDD", "2-0018"),
+	REGULATOR_SUPPLY("IOVDD", "2-0019"),
+	REGULATOR_SUPPLY("DVDD", "2-0019"),
 };
 
 #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
@@ -743,11 +747,19 @@ static struct aic3x_pdata rx51_aic3x_data = {
 	.gpio_reset = 60,
 };
 
+static struct aic3x_pdata rx51_aic3x_data2 = {
+	.gpio_reset = 60,
+};
+
 static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = {
 	{
 		I2C_BOARD_INFO("tlv320aic3x", 0x18),
 		.platform_data = &rx51_aic3x_data,
 	},
+	{
+		I2C_BOARD_INFO("tlv320aic3x", 0x19),
+		.platform_data = &rx51_aic3x_data2,
+	},
 #if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE)
 	{
 		I2C_BOARD_INFO("tsl2563", 0x29),
Signature · 1 line
1.7.2.3
maintainer
#3 lore raw

PATCH 1/3 omap: rx51: Remove __initdata from rx51_tpa6130a2_data

In reply to Jarkko Nikula
Quoted 16 lines · Jarkko Nikula

If the TPA6130 is compiled as module the id and power_gpio values are arbitrary at module probing time since the rx51_tpa6130a2_data was marked as __initdata.

---
For 2.6.38 as the TPA6130 is not used in 2.6.37.

---
 arch/arm/mach-omap2/board-rx51-peripherals.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-rx51-peripherals.c +0 -0
index 126b724..cde6847 100644

arch/arm/mach-omap2/board-rx51-peripherals.c static struct twl4030_platform_data rx51_twldata __initdata = { · line 725

Quoted 8 lines
arch/arm/mach-omap2/board-rx51-peripherals.c +1 -1
@@ -719,7 +719,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
 	.vio			= &rx51_vio,
 };
 
-static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata = {
+static struct tpa6130a2_platform_data rx51_tpa6130a2_data = {
 	.id			= TPA6130A2,
 	.power_gpio		= 98,
 };

How about __initdata_or_module instead of __initdata?

Regards,

Tony

#4 lore raw

PATCH v2 1/1 omap: rx51: Switch rx51_tpa6130a2_data __initdata to __initdata_or_module

If the TPA6130 is compiled as module the id and power_gpio values are arbitrary at module probing time since the rx51_tpa6130a2_data was marked as __initdata. Fix this by using __initdata_or_module. Then __initdata is defined only if the kernel is built without CONFIG_MODULES and omitted otherwise.

---
For 2.6.38 as the TPA6130 is not used in 2.6.37.
v2
- __initdata not removed but replaced with __initdata_or_module. Thanks to Tony Lindgren <[email protected]> for hint.

---
 arch/arm/mach-omap2/board-rx51-peripherals.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-rx51-peripherals.c +1 -1
index 7ea2081..fd95ccf 100644
@@ -722,7 +722,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
 	.vio			= &rx51_vio,
 };
 
-static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata = {
+static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata_or_module = {
 	.id			= TPA6130A2,
 	.power_gpio		= 98,
 };
Signature · 1 line
1.7.0.4
maintainer
#5 lore raw

PATCH v2 1/1 omap: rx51: Switch rx51_tpa6130a2_data __initdata to __initdata_or_module

Quoted 5 lines · Jarkko Nikula

If the TPA6130 is compiled as module the id and power_gpio values are arbitrary at module probing time since the rx51_tpa6130a2_data was marked as __initdata. Fix this by using __initdata_or_module. Then __initdata is defined only if the kernel is built without CONFIG_MODULES and omitted otherwise.

Thanks applying.

Tony