firmware-utils: bump to git HEAD
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0463-gpio-ir-overlay-add-parameter-to-configure-signal-po.patch
1 From e253d03936265dc4ab8ae9ae89d2a885e80a45a6 Mon Sep 17 00:00:00 2001
2 From: Matthias Reichl <hias@horus.com>
3 Date: Fri, 6 Mar 2020 11:08:10 +0100
4 Subject: [PATCH] gpio-ir-overlay: add parameter to configure signal
5 polarity (#3490)
6
7 Standard IR receivers use inverted / active-low signalling
8 and the gpio-ir overlay configures the GPIO appropriately
9 as GPIO_ACTIVE_LOW (1).
10
11 In order to support (rather rare) non-inverted / active-high
12 signalling the GPIO needs to be configured as GPIO_ACTIVE_HIGH (0).
13
14 Add an "invert" parameter to override this like in the gpio-ir-tx
15 overlay.
16
17 Signed-off-by: Matthias Reichl <hias@horus.com>
18 ---
19 arch/arm/boot/dts/overlays/README | 4 ++++
20 arch/arm/boot/dts/overlays/gpio-ir-overlay.dts | 1 +
21 2 files changed, 5 insertions(+)
22
23 --- a/arch/arm/boot/dts/overlays/README
24 +++ b/arch/arm/boot/dts/overlays/README
25 @@ -754,6 +754,10 @@ Params: gpio_pin Input pi
26 gpio_pull Desired pull-up/down state (off, down, up)
27 Default is "up".
28
29 + invert "1" = invert the input (active-low signalling).
30 + "0" = non-inverted input (active-high
31 + signalling). Default is "1".
32 +
33 rc-map-name Default rc keymap (can also be changed by
34 ir-keytable), defaults to "rc-rc6-mce"
35
36 --- a/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts
37 +++ b/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts
38 @@ -42,6 +42,7 @@
39 <&gpio_ir_pins>,"brcm,pins:0",
40 <&gpio_ir_pins>,"reg:0";
41 gpio_pull = <&gpio_ir_pins>,"brcm,pull:0"; // pull-up/down state
42 + invert = <&gpio_ir>,"gpios:8"; // 0 = active high input
43
44 rc-map-name = <&gpio_ir>,"linux,rc-map-name"; // default rc map
45 };