From: Heiner Kallweit <hkallweit1@gmail.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [git:media_tree/master] [media] media: rc: nuvoton: support reading / writing wakeup sequence via sysfs
Date: Thu, 3 Mar 2016 20:22:35 +0100 [thread overview]
Message-ID: <56D88EFB.1090105@gmail.com> (raw)
In-Reply-To: <20160303155200.43d4c5e7@recife.lan>
Am 03.03.2016 um 19:52 schrieb Mauro Carvalho Chehab:
> Em Thu, 03 Mar 2016 19:18:17 +0100
> Heiner Kallweit <hkallweit1@gmail.com> escreveu:
>
>> Am 03.03.2016 um 12:28 schrieb Mauro Carvalho Chehab:
>>> This is an automatic generated email to let you know that the following patch were queued at the
>>> http://git.linuxtv.org/cgit.cgi/media_tree.git tree:
>>>
>>> Subject: [media] media: rc: nuvoton: support reading / writing wakeup sequence via sysfs
>>> Author: Heiner Kallweit <hkallweit1@gmail.com>
>>> Date: Mon Feb 8 17:25:59 2016 -0200
>>>
>>> This patch adds a binary attribute /sys/class/rc/rc?/wakeup_data which
>>> allows to read / write the wakeup sequence.
>>>
>> When working on another module I was reminded not to forget updating Documentation/ABI.
>> I think the same applies here. This patch introduces a new sysfs attribute that should
>> be documented. I'll submit a patch for adding Documentation/ABI/testing/sysfs-class-rc-nuvoton
>
> Good point.
>
> Another thing: wouldn't be better to use a text format? This would make
> esier to import from LIRC's irrecord format:
>
> begin raw_codes
>
> name power
> 850 900 1750 1800 850 900
> 850 900 1750 900 850 1800
> 850 900 850 900 850 900
> 1750 1800 800
>
> end raw_codes
>
> Regards,
> Mauro
>
Most likely this is possible, but it would mean that we need a parser / generator
for this text format in the driver / kernel code. And I have my doubts that parsing
an application-specific file format (that could change anytime) in kernel code is
a good thing. Converting this format to raw binary data is better off in userspace
I think. What's your opinion?
>>
>> Rgds, Heiner
>>
>>> 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>
>>>
>>> drivers/media/rc/nuvoton-cir.c | 85 ++++++++++++++++++++++++++++++++++++++++++
>>> drivers/media/rc/nuvoton-cir.h | 3 ++
>>> 2 files changed, 88 insertions(+)
>>>
>>> ---
>>>
>>> [...]
next prev parent reply other threads:[~2016-03-03 19:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1abRXi-00035h-0E@www.linuxtv.org>
2016-03-03 18:18 ` [git:media_tree/master] [media] media: rc: nuvoton: support reading / writing wakeup sequence via sysfs Heiner Kallweit
2016-03-03 18:52 ` Mauro Carvalho Chehab
2016-03-03 19:22 ` Heiner Kallweit [this message]
2016-03-03 20:56 ` Mauro Carvalho Chehab
2016-03-03 21:39 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56D88EFB.1090105@gmail.com \
--to=hkallweit1@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.