lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1414978003-20437-1-git-send-email-hugh.kang@lge.com>
Date:	Mon,  3 Nov 2014 10:26:43 +0900
From:	Hugh Kang <hugh.kang@....com>
To:	Liam Girdwood <lgirdwood@...il.com>
Cc:	Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
	jonghoon.park@....com, hugh.kang@....com
Subject: [PATCH] regulator: adding disable options for regulator-always-on and regulator-boots-on

From: "hugh.kang" <hugh.kang@....com>

If a regulator is set by always-on option, the regulator will be set forever.
For example, suppose LDO1 is set to always-on at RevA.dts with including of a.dtsi. After that
RevB.dts may wants to include the same a.dtsi but override the LDO1 always-on option. However,
currently there is no way to delete the always-on option, even when we change the LDO1 option value,
the always-on setting is still remains.

Signed-off-by: hugh.kang <hugh.kang@....com>
---
 drivers/regulator/of_regulator.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index ee5e67b..4178dbd 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -52,7 +52,13 @@ static void of_get_regulation_constraints(struct device_node *np,
 		constraints->valid_ops_mask |= REGULATOR_CHANGE_CURRENT;
 
 	constraints->boot_on = of_property_read_bool(np, "regulator-boot-on");
+	if (of_property_read_bool(np, "regulator-disable-boot-on"))
+		constraints->boot_on = false;
+
 	constraints->always_on = of_property_read_bool(np, "regulator-always-on");
+	if (of_property_read_bool(np, "regulator-disable-always-on"))
+		constraints->always_on = false;
+
 	if (!constraints->always_on) /* status change should be possible. */
 		constraints->valid_ops_mask |= REGULATOR_CHANGE_STATUS;
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ