kernel: bump 4.9 to 4.9.207
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.19 / 950-0792-overlays-mcp23017-Add-option-for-not-connecting-the-.patch
1 From b37ac8c50684c3517fb9c6f737e7ea444a7d7405 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Thu, 5 Sep 2019 17:41:46 +0100
4 Subject: [PATCH 792/806] overlays: mcp23017: Add option for not connecting the
5 int GPIO
6
7 The interrupt GPIO is optional to the driver, therefore add an
8 option to not configure it.
9
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
11 ---
12 arch/arm/boot/dts/overlays/README | 1 +
13 .../boot/dts/overlays/mcp23017-overlay.dts | 21 +++++++++++++------
14 2 files changed, 16 insertions(+), 6 deletions(-)
15
16 --- a/arch/arm/boot/dts/overlays/README
17 +++ b/arch/arm/boot/dts/overlays/README
18 @@ -1427,6 +1427,7 @@ Params: gpiopin Gpio pin
19 addr I2C address of the MCP23017 (default: 0x20)
20
21 mcp23008 Configure an MCP23008 instead.
22 + noints Disable the interrupt GPIO line.
23
24
25 Name: mcp23s17
26 --- a/arch/arm/boot/dts/overlays/mcp23017-overlay.dts
27 +++ b/arch/arm/boot/dts/overlays/mcp23017-overlay.dts
28 @@ -34,11 +34,6 @@
29 reg = <0x20>;
30 gpio-controller;
31 #gpio-cells = <2>;
32 - #interrupt-cells=<2>;
33 - interrupt-parent = <&gpio>;
34 - interrupts = <4 2>;
35 - interrupt-controller;
36 - microchip,irq-mirror;
37
38 status = "okay";
39 };
40 @@ -52,11 +47,25 @@
41 };
42 };
43
44 + fragment@4 {
45 + target = <&i2c1>;
46 + __overlay__ {
47 + mcp23017_irq: mcp@20 {
48 + #interrupt-cells=<2>;
49 + interrupt-parent = <&gpio>;
50 + interrupts = <4 2>;
51 + interrupt-controller;
52 + microchip,irq-mirror;
53 + };
54 + };
55 + };
56 +
57 __overrides__ {
58 gpiopin = <&mcp23017_pins>,"brcm,pins:0",
59 - <&mcp23017>,"interrupts:0";
60 + <&mcp23017_irq>,"interrupts:0";
61 addr = <&mcp23017>,"reg:0", <&mcp23017_pins>,"reg:0";
62 mcp23008 = <0>,"=3";
63 + noints = <0>,"!1!4";
64 };
65 };
66