linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Devkit8000: Fixes for power regulator
@ 2010-05-08  4:31 Thomas Weber
  2010-05-08  4:31 ` [PATCH 1/6] Devkit8000: Fix the power supply for ads7846 Thomas Weber
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Thomas Weber @ 2010-05-08  4:31 UTC (permalink / raw)
  To: linux-omap; +Cc: Thomas Weber, Tony Lindgren, Russell King

These patches fixes some errors in the usage of the 
power regulator.

The Devkit8000 uses the TPS65930, an reduced version of the TWL4030. 
So not all power supplies from the TWL4030 are available.
There were also a wrong comment about the pins supported by the vmmc1. 
The DSS2 do not need a VDVI any longer so it is removed. 
The definition of the supplies are changed to use the new REGULATOR_SUPPLY macro.

Thomas Weber (6):
  Devkit8000: Fix the power supply for ads7846
  Devkit8000: Remove unneeded VDVI
  Devkit8000: Remove nonexisting vsim
  Devkit8000: Using the REGULATOR_SUPPLY macro
  Devkit8000: Fix comment
  Devkit8000: Change twl4030 to tps65930

 arch/arm/mach-omap2/board-devkit8000.c |   73 +++++++++++++-------------------
 1 files changed, 30 insertions(+), 43 deletions(-)


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

* [PATCH 1/6] Devkit8000: Fix the power supply for ads7846
  2010-05-08  4:31 [PATCH 0/6] Devkit8000: Fixes for power regulator Thomas Weber
@ 2010-05-08  4:31 ` Thomas Weber
  2010-05-08  4:31 ` [PATCH 2/6] Devkit8000: Remove unneeded VDVI Thomas Weber
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Weber @ 2010-05-08  4:31 UTC (permalink / raw)
  To: linux-omap; +Cc: Thomas Weber

Corrected the wrong supplies in Devkit8000 board code.

Add supply for ads7846 to support the new regulator framework for
touchscreen.

Signed-off-by: Thomas Weber <weber@corscience.de>
---
 arch/arm/mach-omap2/board-devkit8000.c |   32 ++++++++++++++++++++++++++------
 1 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 47e3af2..7ad5684 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -168,6 +168,10 @@ static struct regulator_consumer_supply devkit8000_vsim_supply = {
 	.supply			= "vmmc_aux",
 };
 
+/* ads7846 on SPI */
+static struct regulator_consumer_supply devkit8000_vio_supplies[] = {
+	REGULATOR_SUPPLY("vcc", "spi2.0")
+};
 
 static struct omap_dss_device devkit8000_lcd_device = {
 	.name                   = "lcd",
@@ -282,7 +286,7 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
 	.setup		= devkit8000_twl_gpio_setup,
 };
 
-static struct regulator_consumer_supply devkit8000_vpll2_supplies[] = {
+static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = {
 	{
 	.supply		= "vdvi",
 	.dev		= &devkit8000_lcd_device.dev,
@@ -337,8 +341,8 @@ static struct regulator_init_data devkit8000_vdac = {
 	.consumer_supplies	= &devkit8000_vdda_dac_supply,
 };
 
-/* VPLL2 for digital video outputs */
-static struct regulator_init_data devkit8000_vpll2 = {
+/* VPLL1 for digital video outputs */
+static struct regulator_init_data devkit8000_vpll1 = {
 	.constraints = {
 		.name			= "VDVI",
 		.min_uV			= 1800000,
@@ -348,8 +352,23 @@ static struct regulator_init_data devkit8000_vpll2 = {
 		.valid_ops_mask		= REGULATOR_CHANGE_MODE
 					| REGULATOR_CHANGE_STATUS,
 	},
-	.num_consumer_supplies	= ARRAY_SIZE(devkit8000_vpll2_supplies),
-	.consumer_supplies	= devkit8000_vpll2_supplies,
+	.num_consumer_supplies	= ARRAY_SIZE(devkit8000_vpll1_supplies),
+	.consumer_supplies	= devkit8000_vpll1_supplies,
+};
+
+/* VAUX4 for ads7846 and nubs */
+static struct regulator_init_data devkit8000_vio = {
+	.constraints = {
+		.min_uV                 = 1800000,
+		.max_uV                 = 1800000,
+		.apply_uV               = true,
+		.valid_modes_mask       = REGULATOR_MODE_NORMAL
+			| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask         = REGULATOR_CHANGE_MODE
+			| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies  = ARRAY_SIZE(devkit8000_vio_supplies),
+	.consumer_supplies      = devkit8000_vio_supplies,
 };
 
 static struct twl4030_usb_data devkit8000_usb_data = {
@@ -376,7 +395,8 @@ static struct twl4030_platform_data devkit8000_twldata = {
 	.vmmc1		= &devkit8000_vmmc1,
 	.vsim		= &devkit8000_vsim,
 	.vdac		= &devkit8000_vdac,
-	.vpll2		= &devkit8000_vpll2,
+	.vpll1		= &devkit8000_vpll1,
+	.vio		= &devkit8000_vio,
 	.keypad		= &devkit8000_kp_data,
 };
 
-- 
1.6.4.4


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

* [PATCH 2/6] Devkit8000: Remove unneeded VDVI
  2010-05-08  4:31 [PATCH 0/6] Devkit8000: Fixes for power regulator Thomas Weber
  2010-05-08  4:31 ` [PATCH 1/6] Devkit8000: Fix the power supply for ads7846 Thomas Weber
@ 2010-05-08  4:31 ` Thomas Weber
  2010-05-08  4:31 ` [PATCH 3/6] Devkit8000: Remove nonexisting vsim Thomas Weber
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Weber @ 2010-05-08  4:31 UTC (permalink / raw)
  To: linux-omap; +Cc: Thomas Weber

Removes the VDVI from board code because
the VDVI is no longer needed with the new
DSS2 interface.

Signed-off-by: Thomas Weber <weber@corscience.de>
---
 arch/arm/mach-omap2/board-devkit8000.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 7ad5684..e557bae 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -288,10 +288,6 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
 
 static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = {
 	{
-	.supply		= "vdvi",
-	.dev		= &devkit8000_lcd_device.dev,
-	},
-	{
 	.supply		= "vdds_dsi",
 	.dev		= &devkit8000_dss_device.dev,
 	}
@@ -344,7 +340,6 @@ static struct regulator_init_data devkit8000_vdac = {
 /* VPLL1 for digital video outputs */
 static struct regulator_init_data devkit8000_vpll1 = {
 	.constraints = {
-		.name			= "VDVI",
 		.min_uV			= 1800000,
 		.max_uV			= 1800000,
 		.valid_modes_mask	= REGULATOR_MODE_NORMAL
-- 
1.6.4.4


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

* [PATCH 3/6] Devkit8000: Remove nonexisting vsim
  2010-05-08  4:31 [PATCH 0/6] Devkit8000: Fixes for power regulator Thomas Weber
  2010-05-08  4:31 ` [PATCH 1/6] Devkit8000: Fix the power supply for ads7846 Thomas Weber
  2010-05-08  4:31 ` [PATCH 2/6] Devkit8000: Remove unneeded VDVI Thomas Weber
@ 2010-05-08  4:31 ` Thomas Weber
  2010-05-08  4:31 ` [PATCH 4/6] Devkit8000: Using the REGULATOR_SUPPLY macro Thomas Weber
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Weber @ 2010-05-08  4:31 UTC (permalink / raw)
  To: linux-omap; +Cc: Thomas Weber

The Devkit8000 uses the cost reduced variant tps65930 of the
twl4030. The TPS65930 only has vdd1, vdd2, vpll1, vio, vmmc1,
vdac and vaux2. Vaux2 is not used on Devkit8000 board.

Signed-off-by: Thomas Weber <weber@corscience.de>
---
 arch/arm/mach-omap2/board-devkit8000.c |   21 ---------------------
 1 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index e557bae..85adf54 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -164,10 +164,6 @@ static struct regulator_consumer_supply devkit8000_vmmc1_supply = {
 	.supply			= "vmmc",
 };
 
-static struct regulator_consumer_supply devkit8000_vsim_supply = {
-	.supply			= "vmmc_aux",
-};
-
 /* ads7846 on SPI */
 static struct regulator_consumer_supply devkit8000_vio_supplies[] = {
 	REGULATOR_SUPPLY("vcc", "spi2.0")
@@ -270,7 +266,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
 
 	/* link regulators to MMC adapters */
 	devkit8000_vmmc1_supply.dev = mmc[0].dev;
-	devkit8000_vsim_supply.dev = mmc[0].dev;
 
 	return 0;
 }
@@ -308,21 +303,6 @@ static struct regulator_init_data devkit8000_vmmc1 = {
 	.consumer_supplies	= &devkit8000_vmmc1_supply,
 };
 
-/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
-static struct regulator_init_data devkit8000_vsim = {
-	.constraints = {
-		.min_uV			= 1800000,
-		.max_uV			= 3000000,
-		.valid_modes_mask	= REGULATOR_MODE_NORMAL
-					| REGULATOR_MODE_STANDBY,
-		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
-					| REGULATOR_CHANGE_MODE
-					| REGULATOR_CHANGE_STATUS,
-	},
-	.num_consumer_supplies	= 1,
-	.consumer_supplies	= &devkit8000_vsim_supply,
-};
-
 /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
 static struct regulator_init_data devkit8000_vdac = {
 	.constraints = {
@@ -388,7 +368,6 @@ static struct twl4030_platform_data devkit8000_twldata = {
 	.gpio		= &devkit8000_gpio_data,
 	.codec		= &devkit8000_codec_data,
 	.vmmc1		= &devkit8000_vmmc1,
-	.vsim		= &devkit8000_vsim,
 	.vdac		= &devkit8000_vdac,
 	.vpll1		= &devkit8000_vpll1,
 	.vio		= &devkit8000_vio,
-- 
1.6.4.4


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

* [PATCH 4/6] Devkit8000: Using the REGULATOR_SUPPLY macro
  2010-05-08  4:31 [PATCH 0/6] Devkit8000: Fixes for power regulator Thomas Weber
                   ` (2 preceding siblings ...)
  2010-05-08  4:31 ` [PATCH 3/6] Devkit8000: Remove nonexisting vsim Thomas Weber
@ 2010-05-08  4:31 ` Thomas Weber
  2010-05-08  4:31 ` [PATCH 5/6] Devkit8000: Fix comment Thomas Weber
  2010-05-08  4:31 ` [PATCH 6/6] Devkit8000: Change twl4030 to tps65930 Thomas Weber
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Weber @ 2010-05-08  4:31 UTC (permalink / raw)
  To: linux-omap; +Cc: Thomas Weber

Replacing the supplies with the REGULATOR_SUPPLY macro.

Signed-off-by: Thomas Weber <weber@corscience.de>
---
 arch/arm/mach-omap2/board-devkit8000.c |   27 ++++++++++-----------------
 1 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 85adf54..c0905b0 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -165,9 +165,8 @@ static struct regulator_consumer_supply devkit8000_vmmc1_supply = {
 };
 
 /* ads7846 on SPI */
-static struct regulator_consumer_supply devkit8000_vio_supplies[] = {
-	REGULATOR_SUPPLY("vcc", "spi2.0")
-};
+static struct regulator_consumer_supply devkit8000_vio_supply =
+	REGULATOR_SUPPLY("vcc", "spi2.0");
 
 static struct omap_dss_device devkit8000_lcd_device = {
 	.name                   = "lcd",
@@ -216,10 +215,8 @@ static struct platform_device devkit8000_dss_device = {
 	},
 };
 
-static struct regulator_consumer_supply devkit8000_vdda_dac_supply = {
-	.supply = "vdda_dac",
-	.dev	= &devkit8000_dss_device.dev,
-};
+static struct regulator_consumer_supply devkit8000_vdda_dac_supply =
+	REGULATOR_SUPPLY("vdda_dac", "omapdss");
 
 static int board_keymap[] = {
 	KEY(0, 0, KEY_1),
@@ -281,12 +278,8 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
 	.setup		= devkit8000_twl_gpio_setup,
 };
 
-static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = {
-	{
-	.supply		= "vdds_dsi",
-	.dev		= &devkit8000_dss_device.dev,
-	}
-};
+static struct regulator_consumer_supply devkit8000_vpll1_supply =
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss");
 
 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
 static struct regulator_init_data devkit8000_vmmc1 = {
@@ -327,8 +320,8 @@ static struct regulator_init_data devkit8000_vpll1 = {
 		.valid_ops_mask		= REGULATOR_CHANGE_MODE
 					| REGULATOR_CHANGE_STATUS,
 	},
-	.num_consumer_supplies	= ARRAY_SIZE(devkit8000_vpll1_supplies),
-	.consumer_supplies	= devkit8000_vpll1_supplies,
+	.num_consumer_supplies	= 1,
+	.consumer_supplies	= &devkit8000_vpll1_supply,
 };
 
 /* VAUX4 for ads7846 and nubs */
@@ -342,8 +335,8 @@ static struct regulator_init_data devkit8000_vio = {
 		.valid_ops_mask         = REGULATOR_CHANGE_MODE
 			| REGULATOR_CHANGE_STATUS,
 	},
-	.num_consumer_supplies  = ARRAY_SIZE(devkit8000_vio_supplies),
-	.consumer_supplies      = devkit8000_vio_supplies,
+	.num_consumer_supplies  = 1,
+	.consumer_supplies      = &devkit8000_vio_supply,
 };
 
 static struct twl4030_usb_data devkit8000_usb_data = {
-- 
1.6.4.4


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

* [PATCH 5/6] Devkit8000: Fix comment
  2010-05-08  4:31 [PATCH 0/6] Devkit8000: Fixes for power regulator Thomas Weber
                   ` (3 preceding siblings ...)
  2010-05-08  4:31 ` [PATCH 4/6] Devkit8000: Using the REGULATOR_SUPPLY macro Thomas Weber
@ 2010-05-08  4:31 ` Thomas Weber
  2010-05-08  4:31 ` [PATCH 6/6] Devkit8000: Change twl4030 to tps65930 Thomas Weber
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Weber @ 2010-05-08  4:31 UTC (permalink / raw)
  To: linux-omap; +Cc: Thomas Weber

Fix the comment about the pins supported
by the vmmc1 power source.

Signed-off-by: Thomas Weber <weber@corscience.de>
---
 arch/arm/mach-omap2/board-devkit8000.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index c0905b0..4ca87f8 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -281,7 +281,7 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
 static struct regulator_consumer_supply devkit8000_vpll1_supply =
 	REGULATOR_SUPPLY("vdds_dsi", "omapdss");
 
-/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
+/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT7 (20 mA, plus card == max 220 mA) */
 static struct regulator_init_data devkit8000_vmmc1 = {
 	.constraints = {
 		.min_uV			= 1850000,
-- 
1.6.4.4


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

* [PATCH 6/6] Devkit8000: Change twl4030 to tps65930
  2010-05-08  4:31 [PATCH 0/6] Devkit8000: Fixes for power regulator Thomas Weber
                   ` (4 preceding siblings ...)
  2010-05-08  4:31 ` [PATCH 5/6] Devkit8000: Fix comment Thomas Weber
@ 2010-05-08  4:31 ` Thomas Weber
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Weber @ 2010-05-08  4:31 UTC (permalink / raw)
  To: linux-omap; +Cc: Thomas Weber

Devkit8000 uses the TPS65930 and not the TWL4030.
The TPS65930 uses only a subset of the TWL4030.
So not all voltage regulators of the twl4030
are available on the Devkit8000.

Signed-off-by: Thomas Weber <weber@corscience.de>
---
 arch/arm/mach-omap2/board-devkit8000.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 4ca87f8..03332e8 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -369,7 +369,7 @@ static struct twl4030_platform_data devkit8000_twldata = {
 
 static struct i2c_board_info __initdata devkit8000_i2c_boardinfo[] = {
 	{
-		I2C_BOARD_INFO("twl4030", 0x48),
+		I2C_BOARD_INFO("tps65930", 0x48),
 		.flags = I2C_CLIENT_WAKE,
 		.irq = INT_34XX_SYS_NIRQ,
 		.platform_data = &devkit8000_twldata,
-- 
1.6.4.4


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

end of thread, other threads:[~2010-05-08  4:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-08  4:31 [PATCH 0/6] Devkit8000: Fixes for power regulator Thomas Weber
2010-05-08  4:31 ` [PATCH 1/6] Devkit8000: Fix the power supply for ads7846 Thomas Weber
2010-05-08  4:31 ` [PATCH 2/6] Devkit8000: Remove unneeded VDVI Thomas Weber
2010-05-08  4:31 ` [PATCH 3/6] Devkit8000: Remove nonexisting vsim Thomas Weber
2010-05-08  4:31 ` [PATCH 4/6] Devkit8000: Using the REGULATOR_SUPPLY macro Thomas Weber
2010-05-08  4:31 ` [PATCH 5/6] Devkit8000: Fix comment Thomas Weber
2010-05-08  4:31 ` [PATCH 6/6] Devkit8000: Change twl4030 to tps65930 Thomas Weber

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).