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-next>] [day] [month] [year] [list]
Message-Id: <1470402714-10798-1-git-send-email-fabien.lahoudere@collabora.co.uk>
Date:	Fri,  5 Aug 2016 15:11:53 +0200
From:	Fabien Lahoudere <fabien.lahoudere@...labora.co.uk>
To:	unlisted-recipients:; (no To-header on input)
Cc:	Fabien Lahoudere <fabien.lahoudere@...labora.co.uk>,
	Mark Brown <broonie@...nel.org>,
	Rob Herring <robh+dt@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	linux-spi@...r.kernel.org (open list:SPI SUBSYSTEM),
	devicetree@...r.kernel.org (open list:OPEN FIRMWARE AND FLATTENED
	DEVICE TREE BINDINGS), linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 1/1] generic spidev devices must be registered

Adding spidev in the compatible list, let configure spidev from device tree
instead of C source code.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@...labora.co.uk>
---
 Documentation/devicetree/bindings/spi/spidev.txt | 16 ++++++++++++++++
 drivers/spi/spidev.c                             |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/spidev.txt

diff --git a/Documentation/devicetree/bindings/spi/spidev.txt b/Documentation/devicetree/bindings/spi/spidev.txt
new file mode 100644
index 0000000..23200f2
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spidev.txt
@@ -0,0 +1,16 @@
+* SPIDEV
+
+spidev is a device driver to access to SPI devices using normal userspace I/O calls.
+To make an SPI device compatible with this drivers add:
+
+Required properties:
+- compatible : should be "spidev".
+
+Example:
+
+spidev0: spi@0 {
+	compatible = "spidev";
+	reg = <0>;
+	spi-max-frequency = <1000000>;
+	status = "okay";
+};
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 2e05046..d780491 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -696,6 +696,7 @@ static struct class *spidev_class;
 static const struct of_device_id spidev_dt_ids[] = {
 	{ .compatible = "rohm,dh2228fv" },
 	{ .compatible = "lineartechnology,ltc2488" },
+	{ .compatible = "spidev" },
 	{},
 };
 MODULE_DEVICE_TABLE(of, spidev_dt_ids);
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ