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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240225-regulator-mp8859-v1-3-68ee2c839ded@kernel.org>
Date: Sun, 25 Feb 2024 14:59:29 +0000
From: Mark Brown <broonie@...nel.org>
To: Liam Girdwood <lgirdwood@...il.com>
Cc: linux-kernel@...r.kernel.org, Markus Reichl <m.reichl@...etechno.de>, 
 Mark Brown <broonie@...nel.org>
Subject: [PATCH 3/8] regulator: mp8859: Support enable control

The MP8859 provides a software enable control, support it in the
regulator driver.

Signed-off-by: Mark Brown <broonie@...nel.org>
---
 drivers/regulator/mp8859.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/regulator/mp8859.c b/drivers/regulator/mp8859.c
index b07bc63a25cb..a443ebe927c5 100644
--- a/drivers/regulator/mp8859.c
+++ b/drivers/regulator/mp8859.c
@@ -35,6 +35,7 @@
 
 #define MP8859_GO_BIT			0x01
 
+#define MP8859_ENABLE_MASK		0x80
 
 static int mp8859_set_voltage_sel(struct regulator_dev *rdev, unsigned int sel)
 {
@@ -124,6 +125,9 @@ static const struct regulator_ops mp8859_ops = {
 	.set_voltage_sel = mp8859_set_voltage_sel,
 	.get_voltage_sel = mp8859_get_voltage_sel,
 	.list_voltage = regulator_list_voltage_linear_range,
+	.enable = regulator_enable_regmap,
+	.disable = regulator_disable_regmap,
+	.is_enabled = regulator_is_enabled_regmap,
 };
 
 static const struct regulator_desc mp8859_regulators[] = {
@@ -136,6 +140,9 @@ static const struct regulator_desc mp8859_regulators[] = {
 		.n_voltages = VOL_MAX_IDX + 1,
 		.linear_ranges = mp8859_dcdc_ranges,
 		.n_linear_ranges = 1,
+		.enable_reg = MP8859_CTL1_REG,
+		.enable_mask = MP8859_ENABLE_MASK,
+		.enable_val = MP8859_ENABLE_MASK,
 		.ops = &mp8859_ops,
 		.owner = THIS_MODULE,
 	},

-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ