Skip to content

Commit f01c0fa

Browse files
Aron SzaboPhil Elwell
Aron Szabo
authored and
Phil Elwell
committed
lirc: added support for RaspberryPi GPIO
lirc_rpi: Use read_current_timer to determine transmitter delay. Thanks to jjmz and others See: #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 4d55010 commit f01c0fa

File tree

4 files changed

+763
-0
lines changed

4 files changed

+763
-0
lines changed

drivers/staging/media/lirc/Kconfig

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ menuconfig LIRC_STAGING
1212

1313
if LIRC_STAGING
1414

15+
config LIRC_RPI
16+
tristate "Homebrew GPIO Port Receiver/Transmitter for the RaspberryPi"
17+
depends on LIRC
18+
help
19+
Driver for Homebrew GPIO Port Receiver/Transmitter for the RaspberryPi
20+
1521
config LIRC_ZILOG
1622
tristate "Zilog/Hauppauge IR Transmitter"
1723
depends on LIRC && I2C

drivers/staging/media/lirc/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33

44
# Each configuration option enables a list of files.
55

6+
obj-$(CONFIG_LIRC_RPI) += lirc_rpi.o
67
obj-$(CONFIG_LIRC_ZILOG) += lirc_zilog.o

0 commit comments

Comments
 (0)