lkml.org 
[lkml]   [2022]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] dt-bindings: ps2-gpio: document bus signals open drain
Date
The PS/2 bus defines data and clock line to be open drain, this should
be reflected in the gpio flags set in the binding.

Especially, this is important since the clock line sometimes is driven
by the host while being used as interrupt source.

Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
---
.../devicetree/bindings/serio/ps2-gpio.yaml | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/serio/ps2-gpio.yaml b/Documentation/devicetree/bindings/serio/ps2-gpio.yaml
index 41e43d797651..42dbfe5523fd 100644
--- a/Documentation/devicetree/bindings/serio/ps2-gpio.yaml
+++ b/Documentation/devicetree/bindings/serio/ps2-gpio.yaml
@@ -15,12 +15,18 @@ properties:

data-gpios:
description:
- the gpio used for the data signal
+ the gpio used for the data signal - this should be flagged as
+ active high using open drain with (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)
+ from <dt-bindings/gpio/gpio.h> since the signal is open drain by
+ definition
maxItems: 1

clk-gpios:
description:
- the gpio used for the clock signal
+ the gpio used for the clock signal - this should be flagged as
+ active high using open drain with (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)
+ from <dt-bindings/gpio/gpio.h> since the signal is open drain by
+ definition
maxItems: 1

interrupts:
@@ -52,7 +58,7 @@ examples:
compatible = "ps2-gpio";
interrupt-parent = <&gpio>;
interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
- data-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
- clk-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
+ data-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ clk-gpios = <&gpio 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
write-enable;
};
--
2.35.1
\
 
 \ /
  Last update: 2022-02-15 18:10    [W:0.064 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site