Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: w1: document generic onewire bindings

This patch adds a generic w1 bindings document that describes how w1
slave deviceses are grouped under master nodes. It also augments the
existing w1-gpio.txt document a bit.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

authored by

Daniel Mack and committed by
Sebastian Reichel
dfa32e11 ce397d21

+33 -3
+8 -3
Documentation/devicetree/bindings/w1/w1-gpio.txt
··· 13 13 - linux,open-drain: if specified, the data pin is considered in 14 14 open-drain mode. 15 15 16 + Also refer to the generic w1.txt document. 17 + 16 18 Examples: 17 19 18 - onewire@0 { 20 + onewire { 19 21 compatible = "w1-gpio"; 20 - gpios = <&gpio 126 0>, <&gpio 105 0>; 21 - }; 22 + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; 22 23 24 + battery { 25 + // ... 26 + }; 27 + };
+25
Documentation/devicetree/bindings/w1/w1.txt
··· 1 + Generic devicetree bindings for onewire (w1) busses 2 + =================================================== 3 + 4 + Onewire busses are described through nodes of their master bus controller. 5 + Slave devices are listed as sub-nodes of such master devices. For now, only 6 + one slave is allowed per bus master. 7 + 8 + 9 + Example: 10 + 11 + charger: charger { 12 + compatible = "gpio-charger"; 13 + charger-type = "mains"; 14 + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; 15 + }; 16 + 17 + onewire { 18 + compatible = "w1-gpio"; 19 + gpios = <&gpio 100 0>, <&gpio 101 0>; 20 + 21 + battery { 22 + compatible = "maxim,ds2760"; 23 + power-supplies = <&charger>; 24 + }; 25 + };