Skip to content

Commit 06f22eb

Browse files
Aron Szabopopcornmix
authored andcommitted
lirc: added support for RaspberryPi GPIO
lirc_rpi: Use read_current_timer to determine transmitter delay. Thanks to jjmz and others See: raspberrypi#525 lirc: Remove restriction on gpio pins that can be used with lirc Compute Module, for example could use different pins lirc_rpi: Add parameter to specify input pin pull Depending on the connected IR circuitry it might be desirable to change the gpios internal pull from it pull-down default behaviour. Add a module parameter to allow the user to set it explicitly. Signed-off-by: Julian Scheel <julian@jusst.de> lirc-rpi: Use the higher-level irq control functions This module used to access the irq_chip methods of the gpio controller directly, rather than going through the standard enable_irq/irq_set_irq_type functions. This caused problems on pinctrl-bcm2835 which only implements the irq_enable/disable methods and not irq_unmask/mask. lirc-rpi: Correct the interrupt usage 1) Correct the use of enable_irq (i.e. don't call it so often) 2) Correct the shutdown sequence. 3) Avoid a bcm2708_gpio driver quirk by setting the irq flags earlier lirc-rpi: use getnstimeofday instead of read_current_timer read_current_timer isn't guaranteed to return values in microseconds, and indeed it doesn't on a Pi2. Issue: linux#827 lirc-rpi: Add device tree support, and a suitable overlay The overlay supports DT parameters that match the old module parameters, except that gpio_in_pull should be set using the strings "up", "down" or "off". lirc-rpi: Also support pinctrl-bcm2835 in non-DT mode fix auto-sense in lirc_rpi driver On a Raspberry Pi 2, the lirc_rpi driver might receive spurious interrupts and change it's low-active / high-active setting. When this happens, the IR remote control stops working. This patch disables this auto-detection if the 'sense' parameter was set in the device tree, making the driver robust to such spurious interrupts.
1 parent 10005d6 commit 06f22eb

4 files changed

Lines changed: 764 additions & 0 deletions

File tree

‎drivers/staging/media/lirc/Kconfig‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ config LIRC_PARALLEL
3232
help
3333
Driver for Homebrew Parallel Port Receivers
3434

35+
config LIRC_RPI
36+
tristate "Homebrew GPIO Port Receiver/Transmitter for the RaspberryPi"
37+
depends on LIRC
38+
help
39+
Driver for Homebrew GPIO Port Receiver/Transmitter for the RaspberryPi
40+
3541
config LIRC_SASEM
3642
tristate "Sasem USB IR Remote"
3743
depends on LIRC && USB

‎drivers/staging/media/lirc/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
obj-$(CONFIG_LIRC_BT829) += lirc_bt829.o
77
obj-$(CONFIG_LIRC_IMON) += lirc_imon.o
88
obj-$(CONFIG_LIRC_PARALLEL) += lirc_parallel.o
9+
obj-$(CONFIG_LIRC_RPI) += lirc_rpi.o
910
obj-$(CONFIG_LIRC_SASEM) += lirc_sasem.o
1011
obj-$(CONFIG_LIRC_SERIAL) += lirc_serial.o
1112
obj-$(CONFIG_LIRC_SIR) += lirc_sir.o

0 commit comments

Comments
 (0)