Skip to contentSkip to conversation

media: rc: nuvoton: switch attribute wakeup_data to text

PATCH New Heiner Kallweit 1 participant 1 message Mar 4, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: rc: nuvoton: switch attribute wakeup_data to text

Switch attribute wakeup_data from binary to a text attribute. This makes it easier to handle in userspace and allows to use the output of tools like mode2 almost as is to set a wakeup sequence.
Changing to a text format and values in microseconds also makes the userspace interface independent of the setting of SAMPLE_PERIOD in the driver.

In addition document the new sysfs attribute in
Documentation/ABI/testing/sysfs-class-rc-nuvoton.

---
 Documentation/ABI/testing/sysfs-class-rc-nuvoton | 15 +++++
 drivers/media/rc/nuvoton-cir.c                   | 85 +++++++++++++++---------
 2 files changed, 68 insertions(+), 32 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-rc-nuvoton
Documentation/ABI/testing/sysfs-class-rc-nuvoton new file +15 -0
new file mode 100644
index 0000000..905bcde
@@ -0,0 +1,15 @@
+What:		/sys/class/rc/rcN/wakeup_data
+Date:		Mar 2016
+KernelVersion:	4.6
+Contact:	Mauro Carvalho Chehab <[email protected]>
+Description:
+		Reading this file returns the stored CIR wakeup sequence.
+		It starts with a pulse, followed by a space, pulse etc.
+		All values are in microseconds.
+		The same format can be used to store a wakeup sequence
+		in the Nuvoton chip by writing to this file.
+
+		Note: Some systems reset the stored wakeup sequence to a
+		factory default on each boot. On such systems store the
+		wakeup sequence in a file and set it on boot using e.g.
+		a udev rule.
drivers/media/rc/nuvoton-cir.c +53 -32

138 lines not on this page · raw message

Signature · 1 line
2.7.1