* [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies & init data
@ 2010-01-12 9:13 Anuj Aggarwal
2010-02-05 1:39 ` Tony Lindgren
2010-02-05 8:45 ` Eduardo Valentin
0 siblings, 2 replies; 6+ messages in thread
From: Anuj Aggarwal @ 2010-01-12 9:13 UTC (permalink / raw)
To: linux-omap; +Cc: broonie, lrg, Anuj Aggarwal
A new file for TWL4030/TPS65950 is created which has common supplies
and regulator init data structures. They will be referenced from the
various board-evm files depending upon the EVM requirements, using
the twl4030-pmic.h header file.
Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
---
arch/arm/mach-omap2/twl4030-pmic.c | 175 ++++++++++++++++++++++++++++++++++++
arch/arm/mach-omap2/twl4030-pmic.h | 34 +++++++
2 files changed, 209 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-omap2/twl4030-pmic.c
create mode 100644 arch/arm/mach-omap2/twl4030-pmic.h
diff --git a/arch/arm/mach-omap2/twl4030-pmic.c b/arch/arm/mach-omap2/twl4030-pmic.c
new file mode 100644
index 0000000..0c0a860
--- /dev/null
+++ b/arch/arm/mach-omap2/twl4030-pmic.c
@@ -0,0 +1,175 @@
+/*
+ * twl4030-pmic.c
+ *
+ * Common regulator supplies and init data structs for TWL4030/TPS65950
+ * PMIC for OMAP3 based EVMs. They can be used in various board-evm
+ * files for OMAP3 based platforms using TWL4030.
+ *
+ * Copyright (C) 2010 Texas Instrument Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
+ * whether express or implied; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
+#include <linux/regulator/machine.h>
+
+/* VDAC */
+struct regulator_consumer_supply twl4030_vdac_supply = {
+ .supply = "vdac",
+};
+
+/* VMMC1 */
+struct regulator_consumer_supply twl4030_vmmc1_supply = {
+ .supply = "vmmc",
+};
+
+/* VMMC2 */
+struct regulator_consumer_supply twl4030_vmmc2_supply = {
+ .supply = "vmmc",
+};
+
+/* VSIM */
+struct regulator_consumer_supply twl4030_vsim_supply = {
+ .supply = "vmmc_aux",
+};
+
+/* VPLL2 for digital video outputs */
+struct regulator_consumer_supply twl4030_vpll2_supply = {
+ .supply = "vdvi",
+};
+
+/* Regulator initialization data */
+/* VAUX1 */
+struct regulator_init_data twl4030_vaux1_data = {
+ .constraints = {
+ .min_uV = 2800000,
+ .max_uV = 2800000,
+ .apply_uV = true,
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
+ | REGULATOR_MODE_STANDBY,
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
+ | REGULATOR_CHANGE_STATUS,
+ },
+};
+
+/* VAUX2 */
+struct regulator_init_data twl4030_vaux2_data = {
+ .constraints = {
+ .min_uV = 2800000,
+ .max_uV = 2800000,
+ .apply_uV = true,
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
+ | REGULATOR_MODE_STANDBY,
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
+ | REGULATOR_CHANGE_STATUS,
+ },
+};
+
+/* VAUX3 */
+struct regulator_init_data twl4030_vaux3_data = {
+ .constraints = {
+ .min_uV = 2800000,
+ .max_uV = 2800000,
+ .apply_uV = true,
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
+ | REGULATOR_MODE_STANDBY,
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
+ | REGULATOR_CHANGE_STATUS,
+ },
+};
+
+/* VAUX4 */
+struct regulator_init_data twl4030_vaux4_data = {
+ .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,
+ },
+};
+
+/* VMMC1 */
+struct regulator_init_data twl4030_vmmc1_data = {
+ .constraints = {
+ .min_uV = 1850000,
+ .max_uV = 3150000,
+ .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 = &twl4030_vmmc1_supply,
+};
+
+/* VMMC2 */
+struct regulator_init_data twl4030_vmmc2_data = {
+ .constraints = {
+ .min_uV = 1850000,
+ .max_uV = 1850000,
+ .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 = &twl4030_vmmc2_supply,
+};
+
+/* VSIM */
+struct regulator_init_data twl4030_vsim_data = {
+ .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 = &twl4030_vsim_supply,
+};
+
+/* VDAC */
+struct regulator_init_data twl4030_vdac_data = {
+ .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 = &twl4030_vdac_supply,
+};
+
+/* VPLL2 */
+struct regulator_init_data twl4030_vpll2_data = {
+ .constraints = {
+ .name = "VDVI",
+ .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 = &twl4030_vpll2_supply,
+};
+
diff --git a/arch/arm/mach-omap2/twl4030-pmic.h b/arch/arm/mach-omap2/twl4030-pmic.h
new file mode 100644
index 0000000..7a863d6
--- /dev/null
+++ b/arch/arm/mach-omap2/twl4030-pmic.h
@@ -0,0 +1,34 @@
+/*
+ * twl4030-pmic.h
+ *
+ * Header for common regulator supplies and init data structs for
+ * TWL4030/TPS65950 PMIC for OMAP3 based EVMs.
+ *
+ * Copyright (C) 2010 Texas Instrument Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
+ * whether express or implied; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
+extern struct regulator_consumer_supply twl4030_vdac_supply;
+extern struct regulator_consumer_supply twl4030_vmmc1_supply;
+extern struct regulator_consumer_supply twl4030_vmmc2_supply;
+extern struct regulator_consumer_supply twl4030_vsim_supply;
+extern struct regulator_consumer_supply twl4030_vpll2_supply;
+
+extern struct regulator_init_data twl4030_vaux1_data;
+extern struct regulator_init_data twl4030_vaux2_data;
+extern struct regulator_init_data twl4030_vaux3_data;
+extern struct regulator_init_data twl4030_vaux4_data;
+extern struct regulator_init_data twl4030_vmmc1_data;
+extern struct regulator_init_data twl4030_vmmc2_data;
+extern struct regulator_init_data twl4030_vsim_data;
+extern struct regulator_init_data twl4030_vdac_data;
+extern struct regulator_init_data twl4030_vpll2_data;
+
--
1.6.2.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies & init data
2010-01-12 9:13 [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies & init data Anuj Aggarwal
@ 2010-02-05 1:39 ` Tony Lindgren
2010-03-02 10:49 ` Aggarwal, Anuj
2010-02-05 8:45 ` Eduardo Valentin
1 sibling, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2010-02-05 1:39 UTC (permalink / raw)
To: Anuj Aggarwal; +Cc: linux-omap, broonie, lrg
Hi,
* Anuj Aggarwal <anuj.aggarwal@ti.com> [100112 01:12]:
> A new file for TWL4030/TPS65950 is created which has common supplies
> and regulator init data structures. They will be referenced from the
> various board-evm files depending upon the EVM requirements, using
> the twl4030-pmic.h header file.
Looks like this series needs to be rebased on omap-for-linus branch
in the linux-omap tree. Please also check that the patches apply
against the current for-next branch in the linux-omap tree.
Also, please check that each patch in the series builds (and boots)
with arch/arm/config/omap3_defconfig.
Regards,
Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies & init data
2010-02-05 1:39 ` Tony Lindgren
@ 2010-03-02 10:49 ` Aggarwal, Anuj
0 siblings, 0 replies; 6+ messages in thread
From: Aggarwal, Anuj @ 2010-03-02 10:49 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-omap@vger.kernel.org, broonie@opensource.wolfsonmicro.com,
lrg@slimlogic.co.uk
> -----Original Message-----
> From: Tony Lindgren [mailto:tony@atomide.com]
> Sent: Friday, February 05, 2010 7:10 AM
> To: Aggarwal, Anuj
> Cc: linux-omap@vger.kernel.org; broonie@opensource.wolfsonmicro.com;
> lrg@slimlogic.co.uk
> Subject: Re: [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having
> supplies & init data
>
> Hi,
>
> * Anuj Aggarwal <anuj.aggarwal@ti.com> [100112 01:12]:
> > A new file for TWL4030/TPS65950 is created which has common supplies
> > and regulator init data structures. They will be referenced from the
> > various board-evm files depending upon the EVM requirements, using
> > the twl4030-pmic.h header file.
>
> Looks like this series needs to be rebased on omap-for-linus branch
> in the linux-omap tree. Please also check that the patches apply
> against the current for-next branch in the linux-omap tree.
>
> Also, please check that each patch in the series builds (and boots)
> with arch/arm/config/omap3_defconfig.
Tony,
I have rebased the patch set (version 3) against for-next tip. I have
also checked that each patch builds (and boots) with omap3_defconfig
individually.
Please pull.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies & init data
2010-01-12 9:13 [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies & init data Anuj Aggarwal
2010-02-05 1:39 ` Tony Lindgren
@ 2010-02-05 8:45 ` Eduardo Valentin
2010-02-05 10:09 ` Liam Girdwood
1 sibling, 1 reply; 6+ messages in thread
From: Eduardo Valentin @ 2010-02-05 8:45 UTC (permalink / raw)
To: ext Anuj Aggarwal
Cc: linux-omap@vger.kernel.org, broonie@opensource.wolfsonmicro.com,
lrg@slimlogic.co.uk
Hello Anuj,
First of all, I liked the idea of unifying the regulator definitions
for boards that use twl regulators.
But I guess we need to improve a little bit.
See following comments.
On Tue, Jan 12, 2010 at 10:13:52AM +0100, ext Anuj Aggarwal wrote:
> A new file for TWL4030/TPS65950 is created which has common supplies
> and regulator init data structures. They will be referenced from the
> various board-evm files depending upon the EVM requirements, using
> the twl4030-pmic.h header file.
>
> Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
> ---
> arch/arm/mach-omap2/twl4030-pmic.c | 175 ++++++++++++++++++++++++++++++++++++
> arch/arm/mach-omap2/twl4030-pmic.h | 34 +++++++
> 2 files changed, 209 insertions(+), 0 deletions(-)
> create mode 100644 arch/arm/mach-omap2/twl4030-pmic.c
> create mode 100644 arch/arm/mach-omap2/twl4030-pmic.h
>
> diff --git a/arch/arm/mach-omap2/twl4030-pmic.c b/arch/arm/mach-omap2/twl4030-pmic.c
> new file mode 100644
> index 0000000..0c0a860
> --- /dev/null
> +++ b/arch/arm/mach-omap2/twl4030-pmic.c
> @@ -0,0 +1,175 @@
> +/*
> + * twl4030-pmic.c
> + *
> + * Common regulator supplies and init data structs for TWL4030/TPS65950
> + * PMIC for OMAP3 based EVMs. They can be used in various board-evm
> + * files for OMAP3 based platforms using TWL4030.
> + *
> + * Copyright (C) 2010 Texas Instrument Incorporated - http://www.ti.com/
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation version 2.
> + *
> + * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
> + * whether express or implied; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * General Public License for more details.
> + */
> +
> +#include <linux/regulator/machine.h>
> +
> +/* VDAC */
> +struct regulator_consumer_supply twl4030_vdac_supply = {
> + .supply = "vdac",
> +};
> +
> +/* VMMC1 */
> +struct regulator_consumer_supply twl4030_vmmc1_supply = {
> + .supply = "vmmc",
> +};
> +
> +/* VMMC2 */
> +struct regulator_consumer_supply twl4030_vmmc2_supply = {
> + .supply = "vmmc",
> +};
> +
> +/* VSIM */
> +struct regulator_consumer_supply twl4030_vsim_supply = {
> + .supply = "vmmc_aux",
> +};
> +
> +/* VPLL2 for digital video outputs */
> +struct regulator_consumer_supply twl4030_vpll2_supply = {
> + .supply = "vdvi",
> +};
Ohh no! This is not good! Defining here the supply list would make things harder.
Because from board to board the supply list will change! That's the
whole point of having the supply list. We can't share them for all boards
definitions.
> +
> +/* Regulator initialization data */
> +/* VAUX1 */
> +struct regulator_init_data twl4030_vaux1_data = {
> + .constraints = {
> + .min_uV = 2800000,
> + .max_uV = 2800000,
> + .apply_uV = true,
> + .valid_modes_mask = REGULATOR_MODE_NORMAL
> + | REGULATOR_MODE_STANDBY,
> + .valid_ops_mask = REGULATOR_CHANGE_MODE
> + | REGULATOR_CHANGE_STATUS,
> + },
> +};
> +
> +/* VAUX2 */
> +struct regulator_init_data twl4030_vaux2_data = {
> + .constraints = {
> + .min_uV = 2800000,
> + .max_uV = 2800000,
> + .apply_uV = true,
> + .valid_modes_mask = REGULATOR_MODE_NORMAL
> + | REGULATOR_MODE_STANDBY,
> + .valid_ops_mask = REGULATOR_CHANGE_MODE
> + | REGULATOR_CHANGE_STATUS,
> + },
> +};
> +
> +/* VAUX3 */
> +struct regulator_init_data twl4030_vaux3_data = {
> + .constraints = {
> + .min_uV = 2800000,
> + .max_uV = 2800000,
> + .apply_uV = true,
> + .valid_modes_mask = REGULATOR_MODE_NORMAL
> + | REGULATOR_MODE_STANDBY,
> + .valid_ops_mask = REGULATOR_CHANGE_MODE
> + | REGULATOR_CHANGE_STATUS,
> + },
> +};
> +
> +/* VAUX4 */
> +struct regulator_init_data twl4030_vaux4_data = {
> + .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,
> + },
> +};
> +
> +/* VMMC1 */
> +struct regulator_init_data twl4030_vmmc1_data = {
> + .constraints = {
> + .min_uV = 1850000,
> + .max_uV = 3150000,
> + .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 = &twl4030_vmmc1_supply,
> +};
> +
> +/* VMMC2 */
> +struct regulator_init_data twl4030_vmmc2_data = {
> + .constraints = {
> + .min_uV = 1850000,
> + .max_uV = 1850000,
> + .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 = &twl4030_vmmc2_supply,
> +};
> +
> +/* VSIM */
> +struct regulator_init_data twl4030_vsim_data = {
> + .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 = &twl4030_vsim_supply,
> +};
> +
> +/* VDAC */
> +struct regulator_init_data twl4030_vdac_data = {
> + .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 = &twl4030_vdac_supply,
> +};
> +
> +/* VPLL2 */
> +struct regulator_init_data twl4030_vpll2_data = {
> + .constraints = {
> + .name = "VDVI",
> + .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 = &twl4030_vpll2_supply,
> +};
Defining the regulators should be fine.
> +
> diff --git a/arch/arm/mach-omap2/twl4030-pmic.h b/arch/arm/mach-omap2/twl4030-pmic.h
> new file mode 100644
> index 0000000..7a863d6
> --- /dev/null
> +++ b/arch/arm/mach-omap2/twl4030-pmic.h
> @@ -0,0 +1,34 @@
> +/*
> + * twl4030-pmic.h
> + *
> + * Header for common regulator supplies and init data structs for
> + * TWL4030/TPS65950 PMIC for OMAP3 based EVMs.
> + *
> + * Copyright (C) 2010 Texas Instrument Incorporated - http://www.ti.com/
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation version 2.
> + *
> + * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
> + * whether express or implied; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * General Public License for more details.
> + */
> +
> +extern struct regulator_consumer_supply twl4030_vdac_supply;
> +extern struct regulator_consumer_supply twl4030_vmmc1_supply;
> +extern struct regulator_consumer_supply twl4030_vmmc2_supply;
> +extern struct regulator_consumer_supply twl4030_vsim_supply;
> +extern struct regulator_consumer_supply twl4030_vpll2_supply;
> +
> +extern struct regulator_init_data twl4030_vaux1_data;
> +extern struct regulator_init_data twl4030_vaux2_data;
> +extern struct regulator_init_data twl4030_vaux3_data;
> +extern struct regulator_init_data twl4030_vaux4_data;
> +extern struct regulator_init_data twl4030_vmmc1_data;
> +extern struct regulator_init_data twl4030_vmmc2_data;
> +extern struct regulator_init_data twl4030_vsim_data;
> +extern struct regulator_init_data twl4030_vdac_data;
> +extern struct regulator_init_data twl4030_vpll2_data;
> +
> --
> 1.6.2.4
>
> --
> 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
--
Eduardo Valentin
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies & init data
2010-02-05 8:45 ` Eduardo Valentin
@ 2010-02-05 10:09 ` Liam Girdwood
2010-02-05 10:23 ` Eduardo Valentin
0 siblings, 1 reply; 6+ messages in thread
From: Liam Girdwood @ 2010-02-05 10:09 UTC (permalink / raw)
To: eduardo.valentin
Cc: ext Anuj Aggarwal, linux-omap@vger.kernel.org,
broonie@opensource.wolfsonmicro.com
On Fri, 2010-02-05 at 10:45 +0200, Eduardo Valentin wrote:
> Hello Anuj,
>
> First of all, I liked the idea of unifying the regulator definitions
> for boards that use twl regulators.
>
> But I guess we need to improve a little bit.
>
> See following comments.
>
> On Tue, Jan 12, 2010 at 10:13:52AM +0100, ext Anuj Aggarwal wrote:
> > A new file for TWL4030/TPS65950 is created which has common supplies
> > and regulator init data structures. They will be referenced from the
> > various board-evm files depending upon the EVM requirements, using
> > the twl4030-pmic.h header file.
> >
> > Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
> > ---
> > arch/arm/mach-omap2/twl4030-pmic.c | 175 ++++++++++++++++++++++++++++++++++++
> > arch/arm/mach-omap2/twl4030-pmic.h | 34 +++++++
> > 2 files changed, 209 insertions(+), 0 deletions(-)
> > create mode 100644 arch/arm/mach-omap2/twl4030-pmic.c
> > create mode 100644 arch/arm/mach-omap2/twl4030-pmic.h
> >
> > diff --git a/arch/arm/mach-omap2/twl4030-pmic.c b/arch/arm/mach-omap2/twl4030-pmic.c
> > new file mode 100644
> > index 0000000..0c0a860
> > --- /dev/null
> > +++ b/arch/arm/mach-omap2/twl4030-pmic.c
> > @@ -0,0 +1,175 @@
> > +/*
> > + * twl4030-pmic.c
> > + *
> > + * Common regulator supplies and init data structs for TWL4030/TPS65950
> > + * PMIC for OMAP3 based EVMs. They can be used in various board-evm
> > + * files for OMAP3 based platforms using TWL4030.
> > + *
> > + * Copyright (C) 2010 Texas Instrument Incorporated - http://www.ti.com/
> > + *
> > + * This program is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU General Public License as
> > + * published by the Free Software Foundation version 2.
> > + *
> > + * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
> > + * whether express or implied; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> > + * General Public License for more details.
> > + */
> > +
> > +#include <linux/regulator/machine.h>
> > +
> > +/* VDAC */
> > +struct regulator_consumer_supply twl4030_vdac_supply = {
> > + .supply = "vdac",
> > +};
> > +
> > +/* VMMC1 */
> > +struct regulator_consumer_supply twl4030_vmmc1_supply = {
> > + .supply = "vmmc",
> > +};
> > +
> > +/* VMMC2 */
> > +struct regulator_consumer_supply twl4030_vmmc2_supply = {
> > + .supply = "vmmc",
> > +};
> > +
> > +/* VSIM */
> > +struct regulator_consumer_supply twl4030_vsim_supply = {
> > + .supply = "vmmc_aux",
> > +};
> > +
> > +/* VPLL2 for digital video outputs */
> > +struct regulator_consumer_supply twl4030_vpll2_supply = {
> > + .supply = "vdvi",
> > +};
>
>
> Ohh no! This is not good! Defining here the supply list would make things harder.
> Because from board to board the supply list will change! That's the
> whole point of having the supply list. We can't share them for all boards
> definitions.
OK, my understanding here was that this change was only to support a set
of similar OMAP + TWL4030 boards and not *all* OMAP + TWL4030 boards.
Anuj, what were your intentions here ?
Thanks
Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies & init data
2010-02-05 10:09 ` Liam Girdwood
@ 2010-02-05 10:23 ` Eduardo Valentin
0 siblings, 0 replies; 6+ messages in thread
From: Eduardo Valentin @ 2010-02-05 10:23 UTC (permalink / raw)
To: ext Liam Girdwood
Cc: Valentin Eduardo (Nokia-D/Helsinki), ext Anuj Aggarwal,
linux-omap@vger.kernel.org, broonie@opensource.wolfsonmicro.com
On Fri, Feb 05, 2010 at 11:09:28AM +0100, Liam Girdwood wrote:
> On Fri, 2010-02-05 at 10:45 +0200, Eduardo Valentin wrote:
> > Hello Anuj,
> >
> > First of all, I liked the idea of unifying the regulator definitions
> > for boards that use twl regulators.
> >
> > But I guess we need to improve a little bit.
> >
> > See following comments.
> >
> > On Tue, Jan 12, 2010 at 10:13:52AM +0100, ext Anuj Aggarwal wrote:
> > > A new file for TWL4030/TPS65950 is created which has common supplies
> > > and regulator init data structures. They will be referenced from the
> > > various board-evm files depending upon the EVM requirements, using
> > > the twl4030-pmic.h header file.
> > >
> > > Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
> > > ---
> > > arch/arm/mach-omap2/twl4030-pmic.c | 175 ++++++++++++++++++++++++++++++++++++
> > > arch/arm/mach-omap2/twl4030-pmic.h | 34 +++++++
> > > 2 files changed, 209 insertions(+), 0 deletions(-)
> > > create mode 100644 arch/arm/mach-omap2/twl4030-pmic.c
> > > create mode 100644 arch/arm/mach-omap2/twl4030-pmic.h
> > >
> > > diff --git a/arch/arm/mach-omap2/twl4030-pmic.c b/arch/arm/mach-omap2/twl4030-pmic.c
> > > new file mode 100644
> > > index 0000000..0c0a860
> > > --- /dev/null
> > > +++ b/arch/arm/mach-omap2/twl4030-pmic.c
> > > @@ -0,0 +1,175 @@
> > > +/*
> > > + * twl4030-pmic.c
> > > + *
> > > + * Common regulator supplies and init data structs for TWL4030/TPS65950
> > > + * PMIC for OMAP3 based EVMs. They can be used in various board-evm
> > > + * files for OMAP3 based platforms using TWL4030.
> > > + *
> > > + * Copyright (C) 2010 Texas Instrument Incorporated - http://www.ti.com/
> > > + *
> > > + * This program is free software; you can redistribute it and/or
> > > + * modify it under the terms of the GNU General Public License as
> > > + * published by the Free Software Foundation version 2.
> > > + *
> > > + * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
> > > + * whether express or implied; without even the implied warranty of
> > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> > > + * General Public License for more details.
> > > + */
> > > +
> > > +#include <linux/regulator/machine.h>
> > > +
> > > +/* VDAC */
> > > +struct regulator_consumer_supply twl4030_vdac_supply = {
> > > + .supply = "vdac",
> > > +};
> > > +
> > > +/* VMMC1 */
> > > +struct regulator_consumer_supply twl4030_vmmc1_supply = {
> > > + .supply = "vmmc",
> > > +};
> > > +
> > > +/* VMMC2 */
> > > +struct regulator_consumer_supply twl4030_vmmc2_supply = {
> > > + .supply = "vmmc",
> > > +};
> > > +
> > > +/* VSIM */
> > > +struct regulator_consumer_supply twl4030_vsim_supply = {
> > > + .supply = "vmmc_aux",
> > > +};
> > > +
> > > +/* VPLL2 for digital video outputs */
> > > +struct regulator_consumer_supply twl4030_vpll2_supply = {
> > > + .supply = "vdvi",
> > > +};
> >
> >
> > Ohh no! This is not good! Defining here the supply list would make things harder.
> > Because from board to board the supply list will change! That's the
> > whole point of having the supply list. We can't share them for all boards
> > definitions.
>
> OK, my understanding here was that this change was only to support a set
> of similar OMAP + TWL4030 boards and not *all* OMAP + TWL4030 boards.
Right. Yeah. Now I read patches carefully and that is the case. His patch
set is designed to board-evm's. Which I suppose is TI's boards.
But, can't we extend the set to keep the code available for all of them?
I guess that would be just a matter of defining the twl regulators inside twl4030-pmic.c
and exporting them via that header, but supplies are left for board specific code?
>
> Anuj, what were your intentions here ?
>
> Thanks
>
> Liam
>
> --
> Freelance Developer, SlimLogic Ltd
> ASoC and Voltage Regulator Maintainer.
> http://www.slimlogic.co.uk
>
--
Eduardo Valentin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-02 10:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 9:13 [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies & init data Anuj Aggarwal
2010-02-05 1:39 ` Tony Lindgren
2010-03-02 10:49 ` Aggarwal, Anuj
2010-02-05 8:45 ` Eduardo Valentin
2010-02-05 10:09 ` Liam Girdwood
2010-02-05 10:23 ` Eduardo Valentin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox