Prev: select useful number of entries for DMA debugging v3...
Next: check name_len before down_read xattr_sem and sb_read in ext2_xattr_get
From: Sundar R IYER on 13 Jul 2010 12:20 Mark, > Yes, if you don't have any actual devices to supply. Please find the updated patch below. From 824b75ee4a38014fad6e17dd6d69bd3913053b45 Mon Sep 17 00:00:00 2001 From: Sundar R Iyer <sundar.iyer(a)stericsson.com> Date: Sun, 6 Jun 2010 19:16:03 +0530 Subject: [PATCH v3 2/2] ux500: add ab8500-regulators machine specific data Acked-by: Linus Walleij <linus.walleij(a)stericsson.com> Acked-by: Bengt JONSSON <bengt.g.jonsson(a)stericsson.com> Signed-off-by: Sundar R Iyer <sundar.iyer(a)stericsson.com> --- CHANGELOG v2 -> v3 - Empty the regulator_consumer_supply since there is no actual device to supply v1 -> v2 - Removed NULL device reference arch/arm/mach-ux500/Makefile | 1 + arch/arm/mach-ux500/board-mop500-regulators.c | 179 +++++++++++++++++++++++++ 2 files changed, 180 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-ux500/board-mop500-regulators.c diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile index 0753a69..311f996 100644 --- a/arch/arm/mach-ux500/Makefile +++ b/arch/arm/mach-ux500/Makefile @@ -12,3 +12,4 @@ obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o obj-$(CONFIG_CPU_FREQ) += cpufreq.o obj-$(CONFIG_AB8500_PRCMU_I2C) += ab8500-prcmu-i2c.o +obj-$(CONFIG_REGULATOR_AB8500) += board-mop500-regulators.o diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c new file mode 100644 index 0000000..08bc966 --- /dev/null +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -0,0 +1,179 @@ +/* + * Copyright (C) ST-Ericsson SA 2010 + * + * License Terms: GNU General Public License v2 + * + * Author: Sundar Iyer <sundar.iyer(a)stericsson.com> for ST-Ericsson + * + * MOP500 board specific initialization for regulators + */ +#include <linux/kernel.h> +#include <linux/regulator/machine.h> + +static struct regulator_consumer_supply ab8500_vaux1_consumers[] = { +}; + +struct regulator_init_data ab8500_vaux1_regulator = { + .supply_regulator_dev = NULL, + .constraints = { + .name = "ab8500-vaux1", + .min_uV = 1100000, + .max_uV = 3300000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| + REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers), + .consumer_supplies = ab8500_vaux1_consumers, +}; + +static struct regulator_consumer_supply ab8500_vaux2_consumers[] = { +}; + +struct regulator_init_data ab8500_vaux2_regulator = { + .supply_regulator_dev = NULL, + .constraints = { + .name = "ab8500-vaux2", + .min_uV = 1100000, + .max_uV = 3300000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| + REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux2_consumers), + .consumer_supplies = ab8500_vaux2_consumers, +}; + +static struct regulator_consumer_supply ab8500_vaux3_consumers[] = { +}; + +struct regulator_init_data ab8500_vaux3_regulator = { + .supply_regulator_dev = NULL, + .constraints = { + .name = "ab8500-vaux3", + .min_uV = 1100000, + .max_uV = 3300000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| + REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux3_consumers), + .consumer_supplies = ab8500_vaux3_consumers, +}; + +/* supply for tvout, gpadc, TVOUT LDO */ +static struct regulator_consumer_supply ab8500_vtvout_consumers[] = { +}; + +struct regulator_init_data ab8500_vtvout_init = { + .supply_regulator_dev = NULL, + .constraints = { + .name = "ab8500-vtvout", + .min_uV = 1900000, + .max_uV = 2100000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| + REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = ARRAY_SIZE(ab8500_vtvout_consumers), + .consumer_supplies = ab8500_vtvout_consumers, +}; + +/* supply for ab8500-vaudio, VAUDIO LDO */ +static struct regulator_consumer_supply ab8500_vaudio_consumers[] = { +}; + +struct regulator_init_data ab8500_vaudio_init = { + .supply_regulator_dev = NULL, + .constraints = { + .name = "ab8500-vaudio", + .min_uV = 1925000, + .max_uV = 2075000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| + REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = ARRAY_SIZE(ab8500_vaudio_consumers), + .consumer_supplies = ab8500_vaudio_consumers, +}; + +/* supply for v-anamic1 VAMic1-LDO */ +static struct regulator_consumer_supply ab8500_vamic1_consumers[] = { +}; + +struct regulator_init_data ab8500_vamic1_init = { + .supply_regulator_dev = NULL, + .constraints = { + .name = "ab8500-vamic1", + .min_uV = 2000000, + .max_uV = 2100000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| + REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic1_consumers), + .consumer_supplies = ab8500_vamic1_consumers, +}; + +/* supply for v-amic2, VAMIC2 LDO*/ +static struct regulator_consumer_supply ab8500_vamic2_consumers[] = { +}; + +struct regulator_init_data ab8500_vamic2_init = { + .supply_regulator_dev = NULL, + .constraints = { + .name = "ab8500-vamic2", + .min_uV = 2000000, + .max_uV = 2100000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| + REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic2_consumers), + .consumer_supplies = ab8500_vamic2_consumers, +}; + +/* supply for v-dmic, VDMIC LDO */ +static struct regulator_consumer_supply ab8500_vdmic_consumers[] = { +}; + +struct regulator_init_data ab8500_vdmic_init = { + .supply_regulator_dev = NULL, + .constraints = { + .name = "ab8500-vdmic", + .min_uV = 1700000, + .max_uV = 1950000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| + REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = ARRAY_SIZE(ab8500_vdmic_consumers), + .consumer_supplies = ab8500_vdmic_consumers, +}; + +/* supply for v-intcore12, VINTCORE12 LDO */ +static struct regulator_consumer_supply ab8500_vintcore_consumers[] = { +}; + +struct regulator_init_data ab8500_vintcore_init = { + .supply_regulator_dev = NULL, + .constraints = { + .name = "ab8500-vintcore", + .min_uV = 1200000, + .max_uV = 1350000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| + REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = ARRAY_SIZE(ab8500_vintcore_consumers), + .consumer_supplies = ab8500_vintcore_consumers, +}; + +/* supply for U8500 CSI/DSI, VANA LDO */ +static struct regulator_consumer_supply ab8500_vana_consumers[] = { +}; + +struct regulator_init_data ab8500_vana_init = { + .supply_regulator_dev = NULL, + .constraints = { + .name = "ab8500-vana", + .min_uV = 0, + .max_uV = 1200000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| + REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers), + .consumer_supplies = ab8500_vana_consumers, +}; + -- 1.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Mark Brown on 13 Jul 2010 16:40 On Tue, Jul 13, 2010 at 09:43:44PM +0530, Sundar R IYER wrote: > Subject: [PATCH v3 2/2] ux500: add ab8500-regulators machine specific data > Acked-by: Linus Walleij <linus.walleij(a)stericsson.com> > Acked-by: Bengt JONSSON <bengt.g.jonsson(a)stericsson.com> > Signed-off-by: Sundar R Iyer <sundar.iyer(a)stericsson.com> > +static struct regulator_consumer_supply ab8500_vaux1_consumers[] = { > +}; You may as well just remove these if they're not used but still... Acked-by: Mark Brown <broonie(a)opensource.wolfsonmicro.com> One other thing... > +struct regulator_init_data ab8500_vaudio_init = { > + .supply_regulator_dev = NULL, > + .constraints = { > + .name = "ab8500-vaudio", > + .min_uV = 1925000, > + .max_uV = 2075000, Are you *sure* that all these constraints are accurate for the board? It seems every single voltage is variable even though there are no consumers set up, and they can all be disabled too. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Sundar R IYER on 14 Jul 2010 11:00 Hello Mark, > Acked-by: Mark Brown <broonie(a)opensource.wolfsonmicro.com> Thanks > > +struct regulator_init_data ab8500_vaudio_init = { > > + .supply_regulator_dev = NULL, > > + .constraints = { > > + .name = "ab8500-vaudio", > > + .min_uV = 1925000, > > + .max_uV = 2075000, > > Are you *sure* that all these constraints are accurate for the board? As far as the min/max values of the voltage go, yes they are as per the data sheet. > It seems every single voltage is variable even though there are no > consumers set up, and they can all be disabled too. Yes. all these regulators can be disabled/enabled. does this answer your qeury? ( or i didnt understand it properly??) Thanks, Sundar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Mark Brown on 14 Jul 2010 11:00 On Wed, Jul 14, 2010 at 08:20:54PM +0530, Sundar R IYER wrote: > > > + .name = "ab8500-vaudio", > > > + .min_uV = 1925000, > > > + .max_uV = 2075000, > > Are you *sure* that all these constraints are accurate for the board? > As far as the min/max values of the voltage go, yes they are as per the > data sheet. Which datasheet, and will the system design actually be varying them at runtime - if it will how will it do so? This is the settings for the particular system and generally a lot of these rails will get fixed at design time for various reasons (for example, the analogue supplies will usually depend on the analogue system design). > > It seems every single voltage is variable even though there are no > > consumers set up, and they can all be disabled too. > Yes. all these regulators can be disabled/enabled. does this answer your > qeury? ( or i didnt understand it properly??) Again, is it really the case that this will happen in this system? Nothing is currently able to actually do that, and unless every consumer using a given supply is hooked into the regulator API things will go wrong when some of them start doing so. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Sundar R IYER on 14 Jul 2010 11:40
> Which datasheet, and will the system design actually be varying them at > runtime - if it will how will it do so? This is the settings for the > particular system and generally a lot of these rails will get fixed at > design time for various reasons (for example, the analogue supplies will > usually depend on the analogue system design). I am referring to the AB8500 device data sheet; not sure if its available open. I have taken the minimal/maximum figures as what is mentioned for each supplies. > Again, is it really the case that this will happen in this system? Yes, if you are referring to regulator enable/disable. > Nothing is currently able to actually do that, and unless every consumer > using a given supply is hooked into the regulator API things will go > wrong when some of them start doing so. As i said earlier, my intention is to hard code the machine constraints. The actual control in terms of enable/disable, controlling supply voltages will happen, as you say when consumers are hooked up. Thanks, Sundar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |