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: <20250801070913.3109-4-niklaus.liu@mediatek.com>
Date: Fri, 1 Aug 2025 14:39:37 +0800
From: niklaus.liu <niklaus.liu@...iatek.com>
To: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, Stephen Boyd <sboyd@...nel.org>, Matthias
 Brugger <matthias.bgg@...il.com>, AngeloGioacchino Del Regno
	<angelogioacchino.delregno@...labora.com>, Liam Girdwood
	<lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, Flora Fu
	<flora.fu@...iatek.com>, Alexandre Mergnat <amergnat@...libre.com>,
	Hsin-Hsiung Wang <hsin-hsiung.wang@...iatek.com>
CC: <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>, <linux-mediatek@...ts.infradead.org>,
	<Project_Global_Chrome_Upstream_Group@...iatek.com>, niklaus.liu
	<niklaus.liu@...iatek.com>
Subject: [PATCH 3/3] regulator: Modify mt6315 regulator mode mask

Modify mt6315 regulator mode mask, compatible with all 6315 models

Signed-off-by: niklaus.liu <niklaus.liu@...iatek.com>
---
 drivers/regulator/mt6315-regulator.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/regulator/mt6315-regulator.c b/drivers/regulator/mt6315-regulator.c
index 2608a6652d77..092ff748fe21 100644
--- a/drivers/regulator/mt6315-regulator.c
+++ b/drivers/regulator/mt6315-regulator.c
@@ -218,8 +218,10 @@ static int mt6315_regulator_probe(struct spmi_device *pdev)
 	struct regmap *regmap;
 	struct mt6315_chip *chip;
 	struct mt_regulator_init_data *init_data;
+	struct device_node *node = pdev->dev.of_node;
 	struct regulator_config config = {};
 	struct regulator_dev *rdev;
+	unsigned int val = 0;
 	int i;
 
 	regmap = devm_regmap_init_spmi_ext(pdev, &mt6315_regmap_config);
@@ -247,6 +249,10 @@ static int mt6315_regulator_probe(struct spmi_device *pdev)
 		init_data->modeset_mask[MT6315_VBUCK1] = BIT(MT6315_VBUCK1);
 		break;
 	}
+
+	if (!of_property_read_u32(node, "buck1-modeset-mask", &val))
+		init_data->modeset_mask[MT6315_VBUCK1] = val;
+
 	for (i = MT6315_VBUCK2; i < MT6315_VBUCK_MAX; i++)
 		init_data->modeset_mask[i] = BIT(i);
 
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ