All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarod Wilson <jarod@redhat.com>
To: "David Härdeman" <david@hardeman.nu>
Cc: linux-media@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Anders Eriksson <aeriksson@fastmail.fm>,
	Anssi Hannula <anssi.hannula@iki.fi>
Subject: Re: [PATCH 2/4] imon: split mouse events to a separate input dev
Date: Thu, 16 Sep 2010 09:50:26 -0400	[thread overview]
Message-ID: <20100916135026.GC29829@redhat.com> (raw)
In-Reply-To: <71ca284f14c192e78cd103d19ae4c1b2.squirrel@www.hardeman.nu>

On Thu, Sep 16, 2010 at 03:43:42PM +0200, David Härdeman wrote:
> On Thu, September 16, 2010 15:34, Jarod Wilson wrote:
> > On Thu, Sep 16, 2010 at 01:32:07PM +0200, David Härdeman wrote:
> >> On Thu, September 16, 2010 07:22, Jarod Wilson wrote:
> >> > This is a stab at separating the mouse (and front panel/knob) events
> >> > out to a separate input device. This is necessary in preparation for
> >> > the next patch which makes the rc-core input dev opaque to rc
> >> > drivers.
> >> >
> >> > I can't verify the correctness of the patch beyond the fact that it
> >> > compiles without warnings. The driver has resisted most of my
> >> > attempts at understanding it properly...for example, the double calls
> >> > to le64_to_cpu() and be64_to_cpu() which are applied in
> >> > imon_incoming_packet() and imon_panel_key_lookup() would amount
> >> > to a bswab64() call, irregardless of the cpu endianness, and I think
> >> > the code wouldn't have worked on a big-endian machine...
> >> >
> >> > Signed-off-by: David Härdeman <david@hardeman.nu>
> >> >
> >> > - Minor alterations to apply with minimal core IR changes
> >> > - Use timer for imon keys too, since its entirely possible for the
> >> >   receiver to miss release codes (either by way of another key being
> >> >   pressed while the first is held or by the remote pointing away from
> >> >   the recevier when the key is release. yes, I know, its ugly).
> >>
> >> Where's the additional timer usage exactly? I can't see any in the
> >> patch...
> >
> > For ktype == IMON_KEY_IMON in your original patch, keys were submitted
> > with ir_keydown_notimeout, and in this version, they're submitted with
> > plain old ir_keydown, which has a built-in timeout.
> 
> Oh, I see. But since you're not adding any timer to the driver code itself
> I do not consider the use of plain ir_keydown to be ugly at all (contrary
> to what your comment indicated).

Oh, sorry, that rant was about the receiver hardware, not the actual code
-- yes, the code gets much much cleaner here. :)

> Maybe a keyup hardware event is generated (handled via ir_keyup, good),
> maybe it isnt't (handled via ir-core timeout which calls ir_keyup
> eventually, good).

Yeah, its behaving much better for the specific cases Anssi mentioned in
the bug now. We also get the automatic release of a key that wasn't
released before pressing a second key, by way of the ir_keyup call in
ir_keydown.

-- 
Jarod Wilson
jarod@redhat.com


  reply	other threads:[~2010-09-16 13:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16  5:19 [PATCH 0/4] IR/imon: split out mouse events and fix bugs Jarod Wilson
2010-09-16  5:21 ` [PATCH 1/4] IR: export ir_keyup so imon driver can use it directly Jarod Wilson
2010-09-16  5:22 ` [PATCH 2/4] imon: split mouse events to a separate input dev Jarod Wilson
2010-09-16 11:32   ` David Härdeman
2010-09-16 13:34     ` Jarod Wilson
2010-09-16 13:43       ` David Härdeman
2010-09-16 13:50         ` Jarod Wilson [this message]
2010-09-16  5:23 ` [PATCH 3/4] IR/imon: protect ictx's kc and last_keycode w/spinlock Jarod Wilson
2010-09-16  5:24 ` [PATCH 4/4] IR/imon: set up mce-only devices w/mce keytable Jarod Wilson
2010-09-16  8:11   ` Anders Eriksson
2010-09-16 13:30     ` 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=20100916135026.GC29829@redhat.com \
    --to=jarod@redhat.com \
    --cc=aeriksson@fastmail.fm \
    --cc=anssi.hannula@iki.fi \
    --cc=david@hardeman.nu \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-media@vger.kernel.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 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.