media: rc: core: expose raw packet data via sysfs
cover media: rc: core: expose raw packet data via sysfs
This patch series adds functionality for exposing raw data via sysfs to the core. Up to 128 bytes received since the last break of >= 1s can be read via a binary sysfs attribute.
There are two major use cases:
- getting raw data to be used for defining a wakeup sequence on chips supporting wakeup via RC (e.g. nuvoton-cir)
- debugging and raw data analysis purposes
First user of this new feature is the nuvoton-cir driver.
Motivation for this extension is to allow for an easy way to set wakeup sequences. There have been some attempts in the past for the nuvoton driver but AFAICS it was never finished.
This patch series is going to be complemented with a patch for the nuvoton-cir driver adding functionality to set a wakeup sequence via sysfs.
Eventually setting a wakeup sequence would be as easy as:
- press key to be used for wakeup
- read raw key data from sysfs
- cut raw data after sequence length to be used
- write raw wakeup sequence to sysfs
Works fine here on a Zotac CI321 with nuvoton-cir.
Heiner Kallweit (3):
media: rc: add core functionality to store the most recent raw data
media: rc: expose most recent raw packet via sysfs
media: rc: nuvoton: expose most recent raw packet via sysfs
drivers/media/rc/nuvoton-cir.c | 2 ++ drivers/media/rc/rc-core-priv.h | 6 +++++ drivers/media/rc/rc-ir-raw.c | 34 ++++++++++++++++++++++++++ drivers/media/rc/rc-main.c | 53 +++++++++++++++++++++++++++++++++++++++++ include/media/rc-core.h | 5 +++- 5 files changed, 99 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.0