LIRC Raspberry Pi
Add this to /boot/config.txt:
dtoverlay=lirc-rpi
dtoverlay=lirc-rpi:gpio_in_pin=23,gpio_out_pin=22,gpio_in_pull=up
Add this to /etc/lirc/hardware.conf
# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS="--uinput"
# Don't start lircmd even if there seems to be a good config file
# START_LIRCMD=false
# Don't start irexec, even if a good config file seems to exist.
# START_IREXEC=false
# Try to load appropriate kernel modules
LOAD_MODULES=true
# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="default"
# usually /dev/lirc0 is the correct setting for systems using udev
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"
# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""
Add this to /etc/modprobe.d/lirc-remote.conf
options lirc_rpi gpio_in_pin=23 gpio_out_pin=22