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: raspberrypi/linux#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
  • Loading branch information
Aron Szabo authored and Thadeu Lima de Souza Cascardo committed Apr 27, 2017
1 parent 863ea51 commit 273a56b
Show file tree
Hide file tree
Showing 4 changed files with 760 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 @@ -32,6 +32,12 @@ config LIRC_PARALLEL
help
Driver for Homebrew Parallel Port Receivers

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_SASEM
tristate "Sasem USB IR Remote"
depends on LIRC && USB
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 @@ -6,6 +6,7 @@
obj-$(CONFIG_LIRC_BT829) += lirc_bt829.o
obj-$(CONFIG_LIRC_IMON) += lirc_imon.o
obj-$(CONFIG_LIRC_PARALLEL) += lirc_parallel.o
obj-$(CONFIG_LIRC_RPI) += lirc_rpi.o
obj-$(CONFIG_LIRC_SASEM) += lirc_sasem.o
obj-$(CONFIG_LIRC_SERIAL) += lirc_serial.o
obj-$(CONFIG_LIRC_SIR) += lirc_sir.o
Expand Down
Loading

0 comments on commit 273a56b

Please sign in to comment.