Skip to content

Commit 5dbc0b2

Browse files
HiassofTpopcornmix
authored andcommitted
gpio-ir-overlay: add parameter to configure signal polarity (#3490)
Standard IR receivers use inverted / active-low signalling and the gpio-ir overlay configures the GPIO appropriately as GPIO_ACTIVE_LOW (1). In order to support (rather rare) non-inverted / active-high signalling the GPIO needs to be configured as GPIO_ACTIVE_HIGH (0). Add an "invert" parameter to override this like in the gpio-ir-tx overlay. Signed-off-by: Matthias Reichl <[email protected]>
1 parent d52fd62 commit 5dbc0b2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

arch/arm/boot/dts/overlays/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,10 @@ Params: gpio_pin Input pin number. Default is 18.
754754
gpio_pull Desired pull-up/down state (off, down, up)
755755
Default is "up".
756756

757+
invert "1" = invert the input (active-low signalling).
758+
"0" = non-inverted input (active-high
759+
signalling). Default is "1".
760+
757761
rc-map-name Default rc keymap (can also be changed by
758762
ir-keytable), defaults to "rc-rc6-mce"
759763

arch/arm/boot/dts/overlays/gpio-ir-overlay.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<&gpio_ir_pins>,"brcm,pins:0",
4343
<&gpio_ir_pins>,"reg:0";
4444
gpio_pull = <&gpio_ir_pins>,"brcm,pull:0"; // pull-up/down state
45+
invert = <&gpio_ir>,"gpios:8"; // 0 = active high input
4546

4647
rc-map-name = <&gpio_ir>,"linux,rc-map-name"; // default rc map
4748
};

0 commit comments

Comments
 (0)