diff mbox

[3/6] DT: add documentation for spi-fc-test driver

Message ID 1456843400-20696-3-git-send-email-linux@rempel-privat.de (mailing list archive)
State New, archived
Headers show

Commit Message

Oleksij Rempel March 1, 2016, 2:43 p.m. UTC
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 .../devicetree/bindings/spi/spi-fc-test.txt        | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/spi-fc-test.txt

Comments

Mark Brown March 2, 2016, 2:17 a.m. UTC | #1
On Tue, Mar 01, 2016 at 03:43:17PM +0100, Oleksij Rempel wrote:

>  .../devicetree/bindings/spi/spi-fc-test.txt        | 30 ++++++++++++++++++++++

We should not be supporting DT bindings for a test device that doesn't
represent physical hardware, this is an invitation to abuse by people
writing bad DT bindings for actual hardware.
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/spi/spi-fc-test.txt b/Documentation/devicetree/bindings/spi/spi-fc-test.txt
new file mode 100644
index 0000000..c1f14e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-fc-test.txt
@@ -0,0 +1,30 @@ 
+SPI-FC-TEST is a test driver to simulate slave
+flow control from spi master.
+
+Required properties:
+ - compatible: should be set to "spi-fc-test"
+ - fc-gpio: spi device gpio input for flow control line.
+ - test-cs-in-gpio: chip select gpio input to emulate slave device
+ - test-fc-out-gpio: request gpio output to emulate slave device
+Fallowing required properties are provided by spi framework.
+See spi-bus.txt for more information.
+ - spi-fc-ready
+ - spi-fc-stop-ack
+ - spi-fc-request
+
+Example:
+test-spi@0 {
+	status = "okay";
+	reg = <0>;
+	compatible = "spi-fc-test";
+	spi-max-frequency = <100000>;
+	spi-fc-ready;
+	spi-fc-request;
+	spi-fc-stop-ack;
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi_test_in_pins_bananapi>, <&spi_test_out_pins_bananapi>;
+	fc-gpio = <&pio 7 20 GPIO_ACTIVE_LOW>; /* request line, in IO-4, (PH20) */
+	test-cs-in-gpio = <&pio 7 1 GPIO_ACTIVE_LOW>; /* RXD0, (PH1)  */
+	test-rq-out-gpio = <&pio 7 21 GPIO_ACTIVE_LOW>; /* IO-5, (PH21) */
+};
+