summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/nuvoton-cir.h
diff options
context:
space:
mode:
authorHeiner Kallweit2016-02-08 20:25:59 +0100
committerMauro Carvalho Chehab2016-03-03 12:28:41 +0100
commit449c1fcd86f5077d5076a955e65c07a7c4cbbf9d (patch)
tree9a430bdd64f68372ff995ee22e1600a57861cad2 /drivers/media/rc/nuvoton-cir.h
parent[media] soc_camera/mx3_camera.c: move to staging in preparation, for removal (diff)
downloadkernel-qcow2-linux-449c1fcd86f5077d5076a955e65c07a7c4cbbf9d.tar.gz
kernel-qcow2-linux-449c1fcd86f5077d5076a955e65c07a7c4cbbf9d.tar.xz
kernel-qcow2-linux-449c1fcd86f5077d5076a955e65c07a7c4cbbf9d.zip
[media] media: rc: nuvoton: support reading / writing wakeup sequence via sysfs
This patch adds a binary attribute /sys/class/rc/rc?/wakeup_data which allows to read / write the wakeup sequence. In combination with the core extension for exposing the most recent raw packet this allows to easily define and set a wakeup sequence. At least on my Zotac CI321 the BIOS resets the wakeup sequence at each boot to a factory default. Therefore I use a udev rule SUBSYSTEM=="rc", DRIVERS=="nuvoton-cir", ACTION=="add", RUN+="<script>" with the script basically doing cat <stored wakeup sequence> >/sys${DEVPATH}/wakeup_data Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/rc/nuvoton-cir.h')
-rw-r--r--drivers/media/rc/nuvoton-cir.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
index 4a5650dffa29..c9c98ebb19ee 100644
--- a/drivers/media/rc/nuvoton-cir.h
+++ b/drivers/media/rc/nuvoton-cir.h
@@ -417,3 +417,6 @@ struct nvt_dev {
/* as VISTA MCE definition, valid carrier value */
#define MAX_CARRIER 60000
#define MIN_CARRIER 30000
+
+/* max wakeup sequence length */
+#define WAKEUP_MAX_SIZE 65