public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: Andy Walls <awalls@md.metrocast.net>,
	Jarod Wilson <jarod@wilsonet.com>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	linux-input@vger.kernel.org,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 00/15] ir-core: Several improvements to allow adding LIRC and decoder plugins
Date: Sat, 24 Apr 2010 23:23:53 +0200	[thread overview]
Message-ID: <20100424212353.GB11879@hardeman.nu> (raw)
In-Reply-To: <y2h9e4733911004240807wfa6b0e79q8deb18c425484b6f@mail.gmail.com>

On Sat, Apr 24, 2010 at 11:07:07AM -0400, Jon Smirl wrote:
> On Sat, Apr 24, 2010 at 10:15 AM, David Härdeman <david@hardeman.nu> wrote:
> > On Sat, Apr 24, 2010 at 08:35:48AM -0400, Jon Smirl wrote:
> >> On Sat, Apr 24, 2010 at 1:22 AM, David Härdeman <david@hardeman.nu> wrote:
> >> > I think we're eventually going to want to let rc-core create a 
> >> > chardev
> >> > per rc device to allow for things like reading out scancodes (when
> >> > creating keymaps for new and unknown remotes), raw timings (for
> >> > debugging in-kernel decoders and writing new ones), possibly also
> >> > ioctl's (for e.g. setting all RX parameters in one go or to
> >> > create/destroy additional keymaps, though I'm sure some will want all of
> >> > that to go through sysfs).
> >>
> >> That problem is handled differently in the graphics code.  You only
> >> have one /dev device for graphics. IOCTLs on it are divided into
> >> ranges - core and driver. The IOCTL call initially lands in the core
> >> code, but if it is in the driver range it simply gets forwarded to the
> >> specific driver and handled there.
> >>
> >> Doing it that was avoids needing two /dev devices nodes for the same
> >> device. Two device nodes has problems.  How do you keep them from
> >> being open by two different users and different privilege levels, or
> >> one is open and one closed, etc...
> >
> > I'm not sure which two devices you're talking about. ir-core currently
> > creates no device at all (unless you count the input device). And
> > further down the road I think each rc (ir) device should support
> > multiple keytables, each keytable having an associated input device.
> >
> > Input device(s) would be used by the majority of applications that only
> > want to react on keypresses, the rc device is used by rc-aware
> > applications that want to create new keytables, send ir commands, tweak
> > RX/TX parameters, etc. I do not see how any of your two-device concerns
> > would apply to that division...
> >
> >> Splitting the IOCTL range is easy to add to input core and it won't
> >> effect any existing user space code.
> >
> > The input maintainers have already NAK'ed adding any ir-specific ioctls
> > to the input layer, and I tend to agree with them.
> 
> Based on my experience with DRM adding a split to the IOCTL range is a
> good solution. The split does not add IR specific IOCTLs to the input
> core. The input core just looks at the IOCTL number and if it is out
> of range it forwards it down the chain - to IR core, which can process
> it  or forward to the specific driver.  This model is already in use
> and it works without problem.

I don't care either way. Get the input maintainers to agree and I'll 
happily write patches that follow that approach (writing TX data to the 
input dev will also have to be supported).

The only real problem I see is if we implement > 1 input device per 
rc/ir device (which I think we should do - each logical remote should 
have a separate keytable and input device).

-- 
David Härdeman

  reply	other threads:[~2010-04-24 21:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 17:56 [PATCH 00/15] ir-core: Several improvements to allow adding LIRC and decoder plugins Mauro Carvalho Chehab
2010-04-02  1:44 ` Jon Smirl
2010-04-02 10:20   ` David Härdeman
2010-04-05 20:49     ` Jarod Wilson
2010-04-07  9:32       ` David Härdeman
2010-04-23 17:40         ` Jarod Wilson
2010-04-23 18:06           ` Jon Smirl
2010-04-23 18:29             ` Mauro Carvalho Chehab
2010-04-23 22:20             ` Andy Walls
2010-04-24  5:22               ` David Härdeman
2010-04-24 12:35                 ` Jon Smirl
2010-04-24 14:15                   ` David Härdeman
2010-04-24 15:07                     ` Jon Smirl
2010-04-24 21:23                       ` David Härdeman [this message]
2010-04-24 21:59                         ` Jon Smirl
2010-04-24  5:12           ` David Härdeman
2010-04-28  4:32             ` Jarod Wilson
2010-05-25 21:05               ` Jarod Wilson
2010-05-26 18:28                 ` Jarod Wilson

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=20100424212353.GB11879@hardeman.nu \
    --to=david@hardeman.nu \
    --cc=awalls@md.metrocast.net \
    --cc=jarod@wilsonet.com \
    --cc=jonsmirl@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox