public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <m.chehab@samsung.com>
To: Sean Young <sean@mess.org>
Cc: "Antti Seppälä" <a.seppala@gmail.com>, linux-media@vger.kernel.org
Subject: Re: [RFC PATCH 0/4] rc: Adding support for sysfs wakeup scancodes
Date: Wed, 22 Jan 2014 20:01:42 -0200	[thread overview]
Message-ID: <20140122200142.002a39c2@samsung.com> (raw)
In-Reply-To: <20140122210024.GA3223@pequod.mess.org>

Em Wed, 22 Jan 2014 21:00:24 +0000
Sean Young <sean@mess.org> escreveu:

> On Wed, Jan 22, 2014 at 09:10:58PM +0200, Antti Seppälä wrote:
> > On 22 January 2014 18:29, Sean Young <sean@mess.org> wrote:
> > > On Wed, Jan 22, 2014 at 05:46:28PM +0200, Antti Seppälä wrote:
> > >> On 21 January 2014 14:28, Sean Young <sean@mess.org> wrote:
> > >> > On Mon, Jan 20, 2014 at 09:39:43PM +0200, Antti Seppälä wrote:
> > >> >> This patch series introduces a simple sysfs file interface for reading
> > >> >> and writing wakeup scancodes to rc drivers.
> > >> >>
> > >> >> This is an improved version of my previous patch for nuvoton-cir which
> > >> >> did the same thing via module parameters. This is a more generic
> > >> >> approach allowing other drivers to utilize the interface as well.
> > >> >>
> > >> >> I did not port winbond-cir to this method of wakeup scancode setting yet
> > >> >> because I don't have the hardware to test it and I wanted first to get
> > >> >> some comments about how the patch series looks. I did however write a
> > >> >> simple support to read and write scancodes to rc-loopback module.
> > >> >
> > >> > Doesn't the nuvoton-cir driver need to know the IR protocol for wakeup?
> > >> >
> > >> > This is needed for winbond-cir; I guess this should be another sysfs
> > >> > file, something like "wakeup_protocol". Even if the nuvoton can only
> > >> > handle one IR protocol, maybe it should be exported (readonly) via
> > >> > sysfs?
> > >> >
> > >> > I'm happy to help with a winbond-cir implementation; I have the hardware.
> > >> >
> > >> >
> > >> > Sean
> > >>
> > >> Nuvoton-cir doesn't care about the IR protocol because the hardware
> > >> compares raw IR pulse lengths and wakes the system if received pulse
> > >> is within certain tolerance of the one pre-programmed to the HW. This
> > >> approach is agnostic to the used IR protocol.
> > >
> > > Your patch talks about scancodes which is something entirely different.
> > > This should be renamed to something better.
> > >
> > 
> > I agree that for the nuvoton my choice of wording (scancode) was a
> > poor one. Perhaps wakeup_code would suit both drivers?
> > 
> > > So with the nuvoton you program a set of pulses and spaces; with the
> > > winbond you set the protocol and the scancode. I don't think there is
> > > any shared code here. Maybe it's better to implement the wakeup
> > > sysfs files in the drivers themselves rather than in rcdev, I guess that
> > > depends on whether there are other devices that implement similar
> > > functionality.
> > >
> > 
> > The code to be shared is the logic of creating, parsing and formatting
> > the sysfs file. In the end the drivers are only interested in getting
> > a bunch of values to write to the hardware.
> > 
> > I was thinking about adding another file (wakeup_protocol sounds good)
> > which would tell what semantics are used to interpret the contents of
> > wakeup_code file (rc6, rc5, nec or raw). Would this be a decent
> > solution?
> 
> Good idea. I like it.

Not sure if you saw it, but there's already another patchset proposing
that, that got submitted before this changeset:
	https://patchwork.linuxtv.org/patch/21625/
	
> 
> Sean


-- 

Cheers,
Mauro

  reply	other threads:[~2014-01-22 22:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-03 14:18 [PATCH] nuvoton-cir: Add support for user configurable wake-up codes Antti Seppälä
2014-01-15 19:35 ` Mauro Carvalho Chehab
2014-01-20 19:39   ` [RFC PATCH 0/4] rc: Adding support for sysfs wakeup scancodes Antti Seppälä
2014-01-20 19:39     ` [RFC PATCH 1/4] rc-core: Add defintions needed for sysfs callback Antti Seppälä
2014-01-20 19:39     ` [RFC PATCH 2/4] rc-core: Add support for reading/writing wakeup scancodes via sysfs Antti Seppälä
2014-01-20 19:39     ` [RFC PATCH 3/4] rc-loopback: " Antti Seppälä
2014-01-20 19:39     ` [RFC PATCH 4/4] nuvoton-cir: " Antti Seppälä
2014-01-21 12:28     ` [RFC PATCH 0/4] rc: Adding support for sysfs wakeup scancodes Sean Young
2014-01-22 15:46       ` Antti Seppälä
2014-01-22 16:29         ` Sean Young
2014-01-22 19:10           ` Antti Seppälä
2014-01-22 19:21             ` Antti Palosaari
2014-01-22 21:00             ` Sean Young
2014-01-22 22:01               ` Mauro Carvalho Chehab [this message]
2014-01-23 19:11                 ` Antti Seppälä
2014-02-04 17:54                   ` Mauro Carvalho Chehab
2014-02-05  7:03                     ` Antti Seppälä
2014-02-05  9:36                       ` Mauro Carvalho Chehab
2014-02-05  9:39                       ` James Hogan
2014-02-05  9:42                         ` James Hogan
2014-02-05 18:16                           ` Antti Seppälä
2014-02-05 21:21                             ` Mauro Carvalho Chehab
2014-02-06 10:46                               ` James Hogan
2014-02-06 14:55                                 ` Mauro Carvalho Chehab

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=20140122200142.002a39c2@samsung.com \
    --to=m.chehab@samsung.com \
    --cc=a.seppala@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sean@mess.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox