linux/drivers/media/rc
Andi Shyti fe052da492 [media] rc: add support for IR LEDs driven through SPI
The ir-spi is a simple device driver which supports the
connection between an IR LED and the MOSI line of an SPI device.

The driver, indeed, uses the SPI framework to stream the raw data
provided by userspace through an rc character device. The chardev
is handled by the LIRC framework and its functionality basically
provides:

 - write: the driver gets a pulse/space signal and translates it
   to a binary signal that will be streamed to the IR led through
   the SPI framework.
 - set frequency: sets the frequency whith which the data should
   be sent. This is handle with ioctl with the
   LIRC_SET_SEND_CARRIER flag (as per lirc documentation)
 - set duty cycle: this is also handled with ioctl with the
   LIRC_SET_SEND_DUTY_CYCLE flag. The driver handles duty cycles
   of 50%, 60%, 70%, 75%, 80% and 90%, calculated on 16bit data.

The character device is created under /dev/lircX name, where X is
and ID assigned by the LIRC framework.

Example of usage:

        fd = open("/dev/lirc0", O_RDWR);
        if (fd < 0)
                return -1;

        val = 608000;
        ret = ioctl(fd, LIRC_SET_SEND_CARRIER, &val);
        if (ret < 0)
                return -1;

	val = 60;
        ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, &val);
        if (ret < 0)
                return -1;

        n = write(fd, buffer, BUF_LEN);
        if (n < 0 || n != BUF_LEN)
                ret = -1;

        close(fd);

Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-30 14:21:20 -02:00
..
img-ir [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
keymaps [media] rc: unify nec32 protocol scancode format 2017-01-30 12:17:19 -02:00
Kconfig [media] rc: add support for IR LEDs driven through SPI 2017-01-30 14:21:20 -02:00
Makefile [media] rc: add support for IR LEDs driven through SPI 2017-01-30 14:21:20 -02:00
ati_remote.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
ene_ir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
ene_ir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
fintek-cir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
fintek-cir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
gpio-ir-recv.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
igorplugusb.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
iguanair.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
imon.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
ir-hix5hd2.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
ir-jvc-decoder.c [media] rc: ir-jvc-decoder: Add encode capability 2017-01-30 13:52:57 -02:00
ir-lirc-codec.c [media] lirc: LIRC_{G,S}ET_SEND_MODE fail if device cannot transmit 2017-01-30 11:53:02 -02:00
ir-mce_kbd-decoder.c [media] media: rc: move check whether a protocol is enabled to the core 2015-11-19 11:39:17 -02:00
ir-nec-decoder.c [media] rc: ir-nec-decoder: Add encode capability 2017-01-30 13:52:28 -02:00
ir-rc5-decoder.c [media] rc: ir-rc5-decoder: Add encode capability 2017-01-30 13:50:52 -02:00
ir-rc6-decoder.c [media] rc: ir-rc6-decoder: Add encode capability 2017-01-30 13:51:34 -02:00
ir-rx51.c ktime: Get rid of the union 2016-12-25 17:21:22 +01:00
ir-sanyo-decoder.c [media] rc: ir-sanyo-decoder: Add encode capability 2017-01-30 13:53:28 -02:00
ir-sharp-decoder.c [media] rc: ir-sharp-decoder: Add encode capability 2017-01-30 13:53:57 -02:00
ir-sony-decoder.c [media] rc: ir-sony-decoder: Add encode capability 2017-01-30 13:54:54 -02:00
ir-spi.c [media] rc: add support for IR LEDs driven through SPI 2017-01-30 14:21:20 -02:00
ir-xmp-decoder.c [media] media: rc: move check whether a protocol is enabled to the core 2015-11-19 11:39:17 -02:00
ite-cir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
ite-cir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
lirc_dev.c [media] lirc_dev: LIRC_{G,S}ET_REC_MODE do not work 2017-01-30 11:52:28 -02:00
mceusb.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
meson-ir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
nuvoton-cir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
nuvoton-cir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
rc-core-priv.h [media] rc: ir-sony-decoder: Add encode capability 2017-01-30 13:54:54 -02:00
rc-ir-raw.c [media] rc-ir-raw: do not generate any receiving thread for raw transmitters 2017-01-30 14:14:39 -02:00
rc-loopback.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
rc-main.c [media] rc-core: add support for IR raw transmitters 2017-01-30 14:14:12 -02:00
redrat3.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
serial_ir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
st_rc.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
streamzap.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
sunxi-cir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
ttusbir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
winbond-cir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00