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: <20250226234234.125305-3-inochiama@gmail.com>
Date: Thu, 27 Feb 2025 07:42:30 +0800
From: Inochi Amaoto <inochiama@...il.com>
To: Philipp Zabel <p.zabel@...gutronix.de>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Chen Wang <unicorn_wang@...look.com>,
	Inochi Amaoto <inochiama@...il.com>,
	Paul Walmsley <paul.walmsley@...ive.com>,
	Palmer Dabbelt <palmer@...belt.com>,
	Albert Ou <aou@...s.berkeley.edu>,
	Uwe Kleine-König <u.kleine-koenig@...libre.com>,
	Guo Ren <guoren@...nel.org>
Cc: devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	sophgo@...ts.linux.dev,
	linux-riscv@...ts.infradead.org,
	Yixun Lan <dlan@...too.org>,
	Longbin Li <looong.bin@...il.com>
Subject: [PATCH v2 2/5] reset: simple: Add active-low property support.

Introduce "active-low" property support for the reset-simple driver.
This property allow users to mark the reset device is active low
without adding a new device id in the driver.

Signed-off-by: Inochi Amaoto <inochiama@...il.com>
---
 drivers/reset/reset-simple.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/reset/reset-simple.c b/drivers/reset/reset-simple.c
index 276067839830..4b08f8d70942 100644
--- a/drivers/reset/reset-simple.c
+++ b/drivers/reset/reset-simple.c
@@ -16,6 +16,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/of.h>
+#include <linux/property.h>
 #include <linux/platform_device.h>
 #include <linux/reset-controller.h>
 #include <linux/reset/reset-simple.h>
@@ -190,6 +191,11 @@ static int reset_simple_probe(struct platform_device *pdev)
 		data->status_active_low = devdata->status_active_low;
 	}
 
+	if (device_property_present(dev, "active-low")) {
+		data->active_low = true;
+		data->status_active_low = true;
+	}
+
 	data->membase += reg_offset;
 
 	return devm_reset_controller_register(dev, &data->rcdev);
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ