Skip to content

Commit

Permalink
lirc: added support for RaspberryPi GPIO
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Aron Szabo authored and popcornmix committed Mar 22, 2018
1 parent 8dabfcf commit eae3332
Show file tree
Hide file tree
Showing 4 changed files with 763 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/staging/media/lirc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ menuconfig LIRC_STAGING

if LIRC_STAGING

config LIRC_RPI
tristate "Homebrew GPIO Port Receiver/Transmitter for the RaspberryPi"
depends on LIRC
help
Driver for Homebrew GPIO Port Receiver/Transmitter for the RaspberryPi

config LIRC_ZILOG
tristate "Zilog/Hauppauge IR Transmitter"
depends on LIRC && I2C
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/media/lirc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@

# Each configuration option enables a list of files.

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

0 comments on commit eae3332

Please sign in to comment.