Thread (5 messages) 5 messages, 2 authors, 2016-01-20

Re: [PATCHv3 2/2] gpio: sn65hvs885: Add DT binding documentation

From: Rob Herring <robh@kernel.org>
Date: 2016-01-20 22:25:54
Also in: linux-gpio

On Wed, Jan 20, 2016 at 6:45 AM, Sean Nyekjær [off-list ref] wrote:
Hi

Yes i need to add the gpio-controller and #gpio-cells. But i'm not exactly
sure what gpio-cells means and its difficult to find in documentation.
#*-cells are standard properties that a producer sets for clients to
describe their connection and are necessary to know how to parse
properties such as *-gpios in this case.
I found this in the documentation:
#gpio-cells: The first cell is the GPIO number and the second cell is used
to specify the GPIO polarity.

This device only supports inputs so the gpio-cells option needs to be <1>
or ??
#gpio-cells = <1>;
Most controllers use 2 even if 2nd field is unused. You can use the
2nd field for inputs too. For example, specify that a detect line is
active high or low for detect.

Rob
/Sean


On 2016-01-19 18:20, Rob Herring wrote:
quoted
On Tue, Jan 19, 2016 at 11:22:20AM +0100, Sean Nyekjaer wrote:
quoted
Signed-off-by: Sean Nyekjaer <redacted>
---
  Documentation/devicetree/bindings/gpio/gpio-sn65hvs885.txt | 9
+++++++++
  1 file changed, 9 insertions(+)
  create mode 100644
Documentation/devicetree/bindings/gpio/gpio-sn65hvs885.txt
diff --git a/Documentation/devicetree/bindings/gpio/gpio-sn65hvs885.txt
b/Documentation/devicetree/bindings/gpio/gpio-sn65hvs885.txt
new file mode 100644
index 0000000..56679ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-sn65hvs885.txt
@@ -0,0 +1,9 @@
+* TI SN65HVS885 digital-input serializer
+
+Example:
+       sn65hvs885@3 {
+               compatible = "sn65hvs885";
+               spi-max-frequency = <10000000>;
+               reg = <0>;
What about all the standard gpio controller properties?
quoted
+       };
+
--
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help