Skip to contentSkip to conversation

omap3evm: Enable regulators for camera interface

PATCH In review Deepthy Ravi 2 participants 3 messages Sep 8, 2011 – Sep 13, 2011

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

PATCH 1/8 omap3evm: Enable regulators for camera interface

From: Vaibhav Hiremath <[email protected]>

Enabled 1v8 and 2v8 regulator output, which is being used by camera module.

---
 arch/arm/mach-omap2/board-omap3evm.c |   40 ++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-omap3evm.c +40 -0
index a1184b3..8333ee4 100644
@@ -273,6 +273,44 @@ static struct omap_dss_board_info omap3_evm_dss_data = {
 	.default_device	= &omap3_evm_lcd_device,
 };
 
+static struct regulator_consumer_supply omap3evm_vaux3_supply = {
+	.supply         = "cam_1v8",
+};
+
+static struct regulator_consumer_supply omap3evm_vaux4_supply = {
+	.supply         = "cam_2v8",
+};
+
+/* VAUX3 for CAM_1V8 */
+static struct regulator_init_data omap3evm_vaux3 = {
+	.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  = 1,
+	.consumer_supplies      = &omap3evm_vaux3_supply,
+};
+
+/* VAUX4 for CAM_2V8 */
+static struct regulator_init_data omap3evm_vaux4 = {
+	.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  = 1,
+	.consumer_supplies      = &omap3evm_vaux4_supply,
+};
+
 static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = {
 	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
@@ -499,6 +537,8 @@ static struct twl4030_platform_data omap3evm_twldata = {
 	.vio		= &omap3evm_vio,
 	.vmmc1		= &omap3evm_vmmc1,
 	.vsim		= &omap3evm_vsim,
+	.vaux3          = &omap3evm_vaux3,
+	.vaux4          = &omap3evm_vaux4,
 };
 
 static int __init omap3_evm_i2c_init(void)
Signature · 1 line
1.7.0.4
#1 lore raw

Hi,

Quoted 4 lines · On Thursday 08 September 2011 15:33:51 Deepthy Ravi wrote:

From: Vaibhav Hiremath <[email protected]>

Enabled 1v8 and 2v8 regulator output, which is being used by camera module.

Thanks for the patch. Just one minor comment below.

Quoted 26 lines
---
 arch/arm/mach-omap2/board-omap3evm.c |   40

++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-)

(quoted diff) +0 -0

b/arch/arm/mach-omap2/board-omap3evm.c index a1184b3..8333ee4 100644

arch/arm/mach-omap2/board-omap3evm.c +11 -0
@@ -273,6 +273,44 @@ static struct omap_dss_board_info omap3_evm_dss_data =
 { .default_device	= &omap3_evm_lcd_device,
 };
 
+static struct regulator_consumer_supply omap3evm_vaux3_supply = {
+	.supply         = "cam_1v8",
+};
+
+static struct regulator_consumer_supply omap3evm_vaux4_supply = {
+	.supply         = "cam_2v8",
+};
+
+/* VAUX3 for CAM_1V8 */
+static struct regulator_init_data omap3evm_vaux3 = {
+	.constraints = {

arch/arm/mach-omap2/board-omap3evm.c static struct omap_dss_board_info omap3_evm_dss_data = · line 296

Quoted 10 lines
arch/arm/mach-omap2/board-omap3evm.c +10 -0
+		.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  = 1,
+	.consumer_supplies      = &omap3evm_vaux3_supply,

I might be wrong, but I think we're standardizing on using REGULATOR_SUPPLY arrays as described in commit 786b01a8c1db0c0decca55d660a2a3ebd7cfb26b ("cleanup regulator supply definitions in mach-omap2").

Quoted 29 lines
arch/arm/mach-omap2/board-omap3evm.c +19 -0
+};
+
+/* VAUX4 for CAM_2V8 */
+static struct regulator_init_data omap3evm_vaux4 = {
+	.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  = 1,
+	.consumer_supplies      = &omap3evm_vaux4_supply,
+};
+
 static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = {
 	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
@@ -499,6 +537,8 @@ static struct twl4030_platform_data omap3evm_twldata =
 { .vio		= &omap3evm_vio,
 	.vmmc1		= &omap3evm_vmmc1,
 	.vsim		= &omap3evm_vsim,
+	.vaux3          = &omap3evm_vaux3,
+	.vaux4          = &omap3evm_vaux4,
 };
 
 static int __init omap3_evm_i2c_init(void)
Signature · 3 lines
Regards,

Laurent Pinchart
#2 lore raw

Hi,

Quoted 49 lines

________________________________________
From: Laurent Pinchart [laurent.pinchart at ideasonboard.com]
Sent: Thursday, September 08, 2011 10:21 PM
To: Ravi, Deepthy
Cc: linux-omap at vger.kernel.org; tony at atomide.com; linux at arm.linux.org.uk; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; mchehab at infradead.org; linux-media at vger.kernel.org; g.liakhovetski at gmx.de; Hiremath, Vaibhav
Subject: Re: [PATCH 1/8] omap3evm: Enable regulators for camera interface

Hi,

Quoted 4 lines · On Thursday 08 September 2011 15:33:51 Deepthy Ravi wrote:

From: Vaibhav Hiremath <[email protected]>

Enabled 1v8 and 2v8 regulator output, which is being used by camera module.

Thanks for the patch. Just one minor comment below.

Quoted 32 lines
---
 arch/arm/mach-omap2/board-omap3evm.c |   40

++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-)

(quoted diff) +0 -0

b/arch/arm/mach-omap2/board-omap3evm.c index a1184b3..8333ee4 100644

arch/arm/mach-omap2/board-omap3evm.c +17 -0
@@ -273,6 +273,44 @@ static struct omap_dss_board_info omap3_evm_dss_data =
 { .default_device     = &omap3_evm_lcd_device,
 };
 
+static struct regulator_consumer_supply omap3evm_vaux3_supply = {
+     .supply         = "cam_1v8",
+};
+
+static struct regulator_consumer_supply omap3evm_vaux4_supply = {
+     .supply         = "cam_2v8",
+};
+
+/* VAUX3 for CAM_1V8 */
+static struct regulator_init_data omap3evm_vaux3 = {
+     .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
Quoted 9 lines

arch/arm/mach-omap2/board-omap3evm.c static struct omap_dss_board_info omap3_evm_dss_data = { · line 296

Quoted 4 lines
arch/arm/mach-omap2/board-omap3evm.c +4 -0
+                                     | REGULATOR_CHANGE_STATUS,
+             },
+     .num_consumer_supplies  = 1,
+     .consumer_supplies      = &omap3evm_vaux3_supply,

I might be wrong, but I think we're standardizing on using REGULATOR_SUPPLY arrays as described in commit 786b01a8c1db0c0decca55d660a2a3ebd7cfb26b ("cleanup regulator supply definitions in mach-omap2").

[Deepthy Ravi] Yes, you are right. I will modify it.

Quoted 28 lines
Quoted 28 lines
arch/arm/mach-omap2/board-omap3evm.c +19 -0
+};
+
+/* VAUX4 for CAM_2V8 */
+static struct regulator_init_data omap3evm_vaux4 = {
+     .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  = 1,
+     .consumer_supplies      = &omap3evm_vaux4_supply,
+};
+
 static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = {
      REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
@@ -499,6 +537,8 @@ static struct twl4030_platform_data omap3evm_twldata =
 { .vio                = &omap3evm_vio,
      .vmmc1          = &omap3evm_vmmc1,
      .vsim           = &omap3evm_vsim,
+     .vaux3          = &omap3evm_vaux3,
+     .vaux4          = &omap3evm_vaux4,
 };
 
Quoted 7 lines

arch/arm/mach-omap2/board-omap3evm.c static struct twl4030_platform_data omap3evm_twldata = { · line 544

Quoted 1 line
arch/arm/mach-omap2/board-omap3evm.c +0 -0
 static int __init omap3_evm_i2c_init(void)

--
Regards,

Laurent Pinchart

Thanks,
Deepthy Ravi.