Hi, On Mon, Apr 28, 2014 at 10:35 PM, Inderpal Singh <inderpal.s@xxxxxxxxxxx> wrote: > On some SoCs there could be requirements that two or more voltage > regulators need to maintain certain skew for proper functioning. > > This patch implements a new vitual locker type regulator which can > have multiple output and input regulators. The real regulators will > be hidden under the virtual output regulators. The consumer of the > real regulators need not change anything. Only the name of the real > regulators need to be changed. > > This patch has been tested on exynos5420 based smdk5420. > > Signed-off-by: Doug Anderson <dianders@xxxxxxxxxxxx> > Signed-off-by: Inderpal Singh <inderpal.s@xxxxxxxxxxx> > --- > .../bindings/regulator/locker-regulator.txt | 36 ++ > drivers/regulator/Kconfig | 9 + > drivers/regulator/Makefile | 1 + > drivers/regulator/locker.c | 472 +++++++++++++++++++++ > include/linux/regulator/locker.h | 35 ++ > 5 files changed, 553 insertions(+) I cornered Rob and Mark Rutland a little bit about this at ELC today (sorry!). Neither of them was a huge ran of adding a pseudo device. Rob suggested that Mark Brown might be the best person to give direction here. Mark Brown: any thoughts? Potentially we could also make this type of thing a core regulator property: buck2_reg: BUCK2 { regulator-name = "vdd_arm"; regulator-min-microvolt = <800000>; regulator-max-microvolt = <1500000>; regulator-always-on; regulator-boot-on; regulator-op-mode = <1>; regulator-ramp-delay = <12500>; }; buck3_reg: BUCK3 { regulator-name = "vdd_int"; regulator-min-microvolt = <800000>; regulator-max-microvolt = <1400000>; regulator-always-on; regulator-boot-on; regulator-op-mode = <1>; regulator-ramp-delay = <12500>; regulator-lock-to = <&buck2>; regulator-lock-within = <300000>; }; Another option is to add no device tree code at all and add code to the devfreq / cpufreq drivers used on this device. In order to do this cleanly I think we'd need to extend the regulator core's notification scheme to introduce a new event: REGULATOR_EVENT_VOLTAGE_CHANGING that's called _before_ a voltage change happened. Or maybe there's some yet different (cleaner) solution that I haven't thought of. -Doug -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html