Message ID | 1427928946-31291-3-git-send-email-bjorn.andersson@sonymobile.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On Wed, Apr 01, 2015 at 03:55:43PM -0700, Bjorn Andersson wrote: > Introduce "regulator-allow-drms" to make it possible for board > configuration to enable drms for regulators. I don't think this is a good name, nobody unfamiliar with a fairly obscure feature in the Linux regulator API is going to know what DRMS means. Something like change-load might be clearer.
On Thu, Apr 2, 2015 at 1:54 AM, Mark Brown <broonie@kernel.org> wrote: > On Wed, Apr 01, 2015 at 03:55:43PM -0700, Bjorn Andersson wrote: >> Introduce "regulator-allow-drms" to make it possible for board >> configuration to enable drms for regulators. > > I don't think this is a good name, nobody unfamiliar with a fairly > obscure feature in the Linux regulator API is going to know what DRMS > means. Something like change-load might be clearer. Right. And with the cleanup of the drms handling (drms_uA_update()) that we discussed during ELC it makes more sense for the Linux case as well. I will rework this patch and include it when sending out the cleanup. Would you mind picking the other patches from this series or do you want me to resend them? They are unrelated to this issue and will give us working regulators (without set_load support) on the affected platforms. Regards, Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Apr 02, 2015 at 02:35:07PM -0700, Bjorn Andersson wrote: > Would you mind picking the other patches from this series or do you > want me to resend them? They are unrelated to this issue and will give > us working regulators (without set_load support) on the affected > platforms. There seem to be some dependencies (at least for patch 3) and Stephen had some review comments on patch 5 so it might be safer to leave them - but in theory yes.
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt index abb26b5..a2377cb 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.txt +++ b/Documentation/devicetree/bindings/regulator/regulator.txt @@ -10,6 +10,7 @@ Optional properties: - regulator-always-on: boolean, regulator should never be disabled - regulator-boot-on: bootloader/firmware enabled regulator - regulator-allow-bypass: allow the regulator to go into bypass mode +- regulator-allow-drms: allow dynamic regulator mode switching - <name>-supply: phandle to the parent supply/regulator node - regulator-ramp-delay: ramp delay for regulator(in uV/uS) For hardware which supports disabling ramp rate, it should be explicitly diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 24e812c..bb52532 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -70,6 +70,9 @@ static void of_get_regulation_constraints(struct device_node *np, if (of_property_read_bool(np, "regulator-allow-bypass")) constraints->valid_ops_mask |= REGULATOR_CHANGE_BYPASS; + if (of_property_read_bool(np, "regulator-allow-drms")) + constraints->valid_ops_mask |= REGULATOR_CHANGE_DRMS; + ret = of_property_read_u32(np, "regulator-ramp-delay", &pval); if (!ret) { if (pval)
Introduce "regulator-allow-drms" to make it possible for board configuration to enable drms for regulators. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> --- Documentation/devicetree/bindings/regulator/regulator.txt | 1 + drivers/regulator/of_regulator.c | 3 +++ 2 files changed, 4 insertions(+)