]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
BCM270X_DT: Allow multiple instances of w1-gpio overlays
authorPhil Elwell <phil@raspberrypi.org>
Tue, 28 Mar 2017 13:22:20 +0000 (14:22 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 19 Sep 2017 10:07:57 +0000 (12:07 +0200)
Upcoming firmware will modify the address portion of node names when
their "reg" property is written by a dtparam. Modify the w1-gpio
overlays to write the gpiopin parameter value to "reg" properties, so
that multiple instances can be loaded simultaneously.

Note: The value of the "address" is unimportant - the w1 subsystem
assigns instance numbers to buses sequentially from 1, and it is
not necessary to know which bus a device is on in order to find it.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
arch/arm/boot/dts/overlays/w1-gpio-overlay.dts
arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts

index 29a3b48d19ab36b814c09e4cc4eef6d9e2022da1..f7f8747512653465d01dd1c41a0fcbd2e3e5fbdb 100644 (file)
@@ -23,7 +23,7 @@
        fragment@1 {
                target = <&gpio>;
                __overlay__ {
-                       w1_pins: w1_pins {
+                       w1_pins: w1_pins@0 {
                                brcm,pins = <4>;
                                brcm,function = <0>; // in (initially)
                                brcm,pull = <0>; // off
@@ -33,7 +33,9 @@
 
        __overrides__ {
                gpiopin =       <&w1>,"gpios:4",
-                               <&w1_pins>,"brcm,pins:0";
+                               <&w1>,"reg:0",
+                               <&w1_pins>,"brcm,pins:0",
+                               <&w1_pins>,"reg:0";
                pullup =        <&w1>,"rpi,parasitic-power:0";
        };
 };
index 66a98f6c9601f51483f27803995bec772bb3350e..ef8bfbcabdb31231075d5c281df3b38b1b857c7c 100644 (file)
@@ -23,7 +23,7 @@
        fragment@1 {
                target = <&gpio>;
                __overlay__ {
-                       w1_pins: w1_pins {
+                       w1_pins: w1_pins@0 {
                                brcm,pins = <4 5>;
                                brcm,function = <0 1>; // in out
                                brcm,pull = <0 0>; // off off
@@ -33,7 +33,9 @@
 
        __overrides__ {
                gpiopin =       <&w1>,"gpios:4",
-                               <&w1_pins>,"brcm,pins:0";
+                               <&w1>,"reg:0",
+                               <&w1_pins>,"brcm,pins:0",
+                               <&w1_pins>,"reg:0";
                extpullup =     <&w1>,"gpios:16",
                                <&w1_pins>,"brcm,pins:4";
                pullup =        <&w1>,"rpi,parasitic-power:0";