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] [day] [month] [year] [list]
Message-Id: <20240924103609.12513-2-andreas@kemnade.info>
Date: Tue, 24 Sep 2024 12:36:08 +0200
From: Andreas Kemnade <andreas@...nade.info>
To: Roger Quadros <rogerq@...nel.org>,
	linux-omap@...r.kernel.org,
	Stephen Boyd <sboyd@...nel.org>,
	Kevin Hilman <khilman@...libre.com>,
	Michael Turquette <mturquette@...libre.com>,
	Aaro Koskinen <aaro.koskinen@....fi>,
	linux-kernel@...r.kernel.org,
	Lee Jones <lee@...nel.org>,
	Tony Lindgren <tony@...mide.com>,
	linux-clk@...r.kernel.org
Cc: Andreas Kemnade <andreas@...nade.info>
Subject: [PATCH 1/2] mfd: twl-core: Add a clock subdevice for the TWL6030

Also the TWL6030 has some clocks, so add a subdevice for that.

Signed-off-by: Andreas Kemnade <andreas@...nade.info>
---
 drivers/mfd/twl-core.c | 32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index c130ffef182f..c981922f62d5 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -711,6 +711,10 @@ static struct of_dev_auxdata twl_auxdata_lookup[] = {
 	{ /* sentinel */ },
 };
 
+static const struct mfd_cell twl6030_cells[] = {
+	{ .name = "twl6030-clk" },
+};
+
 static const struct mfd_cell twl6032_cells[] = {
 	{ .name = "twl6032-clk" },
 };
@@ -861,17 +865,25 @@ twl_probe(struct i2c_client *client)
 				 TWL4030_DCDC_GLOBAL_CFG);
 	}
 
-	if (id->driver_data == (TWL6030_CLASS | TWL6032_SUBCLASS)) {
-		status = devm_mfd_add_devices(&client->dev,
-					      PLATFORM_DEVID_NONE,
-					      twl6032_cells,
-					      ARRAY_SIZE(twl6032_cells),
-					      NULL, 0, NULL);
-		if (status < 0)
-			goto free;
-	}
-
 	if (twl_class_is_6030()) {
+		if (id->driver_data & TWL6032_SUBCLASS) {
+			status = devm_mfd_add_devices(&client->dev,
+						      PLATFORM_DEVID_NONE,
+						      twl6032_cells,
+						      ARRAY_SIZE(twl6032_cells),
+						      NULL, 0, NULL);
+			if (status < 0)
+				goto free;
+		} else {
+			status = devm_mfd_add_devices(&client->dev,
+						      PLATFORM_DEVID_NONE,
+						      twl6030_cells,
+						      ARRAY_SIZE(twl6030_cells),
+						      NULL, 0, NULL);
+			if (status < 0)
+				goto free;
+		}
+
 		if (of_device_is_system_power_controller(node)) {
 			if (!pm_power_off)
 				pm_power_off = twl6030_power_off;
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ