All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Kosina <jkosina@suse.cz>
To: Ari Savolainen <ari.m.savolainen@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] HID: fix horizontal wheel for ms comfort mouse 4500
Date: Mon, 11 Jul 2011 14:47:09 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LNX.2.00.1107111445360.11049@pobox.suse.cz> (raw)
In-Reply-To: <CAEbykaXLRazgQhXuZtkhHUw8+eCPNWQ68jsRMZ2E=F6FbmjbUw@mail.gmail.com>

On Mon, 4 Jul 2011, Ari Savolainen wrote:

> Microsoft comfort mouse 4500 has a report descriptor that contains
> usage Consumer.HorizontalWheel three times under three different
> input reports (the report descriptor from debugfs is copied
> below).
> 
> The first of the usages gets mapping REL_WHEEL, but the other two
> get REL_DIAL and REL_MISC due this loop in function
> hidinput_configure_usage (in hid-input.c soon after label
> 'mapped'):
> 
> 	while (usage->code <= max && test_and_set_bit(usage->code, bit))
> 		usage->code = find_next_zero_bit(bit, max + 1, usage->code);
> 
> REL_MISC gets eventually reported when the horizontal wheel is used.
> 
> The purpose of the loop is not clear and deserves, perhaps, an
> explanatory comment. Most of the code works around the loop by
> using map_xxx_clear macros anyway.
> 
> The patch below introduces another such macro (map_rel_clear) and
> changes the wheel mapping to use it.
> 
> It would have been possible to add another quirk in
> hid-microsoft.c but the proposed patch seems to be more in line to
> what is currently done in similar cases. 

Hi,

thanks a lot for debuging this.

For rational of HWHEEL mapping, please see commit 25914662b.

So what I'd like to ask you to do instead would be adding a new quirk. 
Wouldn't DUPLICATE_USAGES be enough here?

If not, please just add a really simple quirk into hid-microsoft.

Thanks,

-- 
Jiri Kosina
SUSE Labs

  reply	other threads:[~2011-07-11 12:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04  8:59 [PATCH] HID: fix horizontal wheel for ms comfort mouse 4500 Ari Savolainen
2011-07-11 12:47 ` Jiri Kosina [this message]
2011-07-11 17:28   ` Ari Savolainen
2011-07-11 18:42   ` Ari Savolainen
2011-07-12  8:33     ` Jiri Kosina

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=alpine.LNX.2.00.1107111445360.11049@pobox.suse.cz \
    --to=jkosina@suse.cz \
    --cc=ari.m.savolainen@gmail.com \
    --cc=linux-input@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.