overlays: i2c1-bcm2708: Don't overwrite i2c1 pins node
authorPhil Elwell <phil@raspberrypi.org>
Wed, 19 Jul 2017 14:20:50 +0000 (15:20 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 8 Oct 2017 01:08:21 +0000 (01:08 +0000)
It is bad practise to overwrite an entire node in an overlay. Instead,
target the node and overwrite any properties that need changing.

See: https://github.com/raspberrypi/linux/pull/2118

Suggested-by: soodvarun78 <soodvarun78@gmail.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts

index e303b9c61c82a28eab7b48f6b085661574d5a849..7c69047bcd88a5c900dddd08e60ad0750b96d785 100644 (file)
    };
 
    fragment@1 {
-      target = <&gpio>;
-      __overlay__ {
-         i2c1_pins: i2c1 {
-            brcm,pins = <2 3>;
-            brcm,function = <4>; /* alt0 */
-         };
+      target = <&i2c1_pins>;
+         pins: __overlay__ {
+         brcm,pins = <2 3>;
+         brcm,function = <4>; /* alt 0 */
       };
    };
-
    __overrides__ {
-      sda1_pin = <&i2c1_pins>,"brcm,pins:0";
-      scl1_pin = <&i2c1_pins>,"brcm,pins:4";
-      pin_func = <&i2c1_pins>,"brcm,function:0";
+      sda1_pin = <&pins>,"brcm,pins:0";
+      scl1_pin = <&pins>,"brcm,pins:4";
+      pin_func = <&pins>,"brcm,function:0";
    };
 };