overlays: gpio-keys: Avoid open-drain warnings
authorPhil Elwell <phil@raspberrypi.com>
Sat, 2 May 2020 12:43:06 +0000 (13:43 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:33:56 +0000 (16:33 +0100)
The i2c-gpio driver expects to use a GPIO in open-drain mode. Failure
to configure it in that way causes alarming warnings in the kernel log.
The BCM283x and BCM2711 GPIO blocks don't support open-drain mode,
but i2c-gpio works anyway. Silence the warning by declaring that
open-drain mode has been enabled by other means.

See: https://github.com/raspberrypi/firmware/issues/1381

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts

index 39e7bc5..def139d 100644 (file)
@@ -16,6 +16,8 @@
                                         &gpio 24 0 /* scl */
                                        >;
                                i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+                               i2c-gpio,sda-open-drain;
+                               i2c-gpio,scl-open-drain;
                                #address-cells = <1>;
                                #size-cells = <0>;
                        };