aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/Makefile
diff options
context:
space:
mode:
authorAndi Shyti <andi.shyti@samsung.com>2016-12-16 04:12:18 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-01-30 14:21:20 -0200
commitfe052da49201ec95bdb0e1c97d574180f8905174 (patch)
treed3c4454388085d7769ce1e22f4a397522e5b3892 /drivers/media/rc/Makefile
parent[media] Documentation: bindings: add documentation for ir-spi device driver (diff)
downloadlinux-dev-fe052da49201ec95bdb0e1c97d574180f8905174.tar.xz
linux-dev-fe052da49201ec95bdb0e1c97d574180f8905174.zip
[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>
Diffstat (limited to 'drivers/media/rc/Makefile')
-rw-r--r--drivers/media/rc/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/rc/Makefile b/drivers/media/rc/Makefile
index 3a984ee301e2..938c98b82b22 100644
--- a/drivers/media/rc/Makefile
+++ b/drivers/media/rc/Makefile
@@ -27,6 +27,7 @@ obj-$(CONFIG_IR_NUVOTON) += nuvoton-cir.o
obj-$(CONFIG_IR_ENE) += ene_ir.o
obj-$(CONFIG_IR_REDRAT3) += redrat3.o
obj-$(CONFIG_IR_RX51) += ir-rx51.o
+obj-$(CONFIG_IR_SPI) += ir-spi.o
obj-$(CONFIG_IR_STREAMZAP) += streamzap.o
obj-$(CONFIG_IR_WINBOND_CIR) += winbond-cir.o
obj-$(CONFIG_RC_LOOPBACK) += rc-loopback.o