[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>
此提交包含在:
Heiner Kallweit
2016-02-08 17:25:59 -02:00
提交者 Mauro Carvalho Chehab
父節點 5ed08a8649
當前提交 449c1fcd86
共有 2 個檔案被更改,包括 88 行新增0 行删除

查看文件

@@ -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