linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Kosina <jkosina@suse.cz>
To: Thomas Ilnseher <illth@gmx.de>
Cc: vojtech@ucw.cz, linux-input@vger.kernel.org
Subject: Re: [RFC][PATCH] correct some quirks for trust 15351 bluetooth mouse
Date: Thu, 19 Jun 2008 11:14:33 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LNX.1.10.0806191111000.4593@jikos.suse.cz> (raw)
In-Reply-To: <1212175271.22054.19.camel@note.localnet>

On Fri, 30 May 2008, Thomas Ilnseher wrote:

> I recently got a (trust 15351) bluetooth mouse.
>
> when I hooked it up to my notebook, Only the Y-Axis did work,
> not the X-Axis. with some help from peter hutterer, I could track the
> problem down an hid->usage of 0006.0020 that got mapped to abs.misc,
> which confused evdev.
>
> There is also a Consumer.HWheel reported, which is not present on the
> mouse, but is a further annoyance (it gets mapped to buttens 6/7,
> that remaps the real buttons 6/7 to 8/9, and you have to use xmodmap).
>
> I composed this patch to make the hid driver ignore these two "features"
> of the mouse.
>
> I'm not sure if this is the right way to do things.

Hi Thomas,

yes, the patch is OK, thanks. I would just prefer if you could change 
this:

> @@ -387,6 +387,8 @@
>
>         /* handle input mappings for quirky devices */
>         ret = hidinput_mapping_quirks(usage, input, &bit, &max);
> +       if (ret == 2)
> +               goto ignore;
>         if (ret)
>                 goto mapped;

and introduce some constants for return values of hidinput_mapping_quirks 
to make this more readable.

I.e. something like HIDINPUT_QUIRK_MAPPED, HIDINPUT_QUIRK_IGNORED, 
HIDINPUT_QUIRK_NONE, and return these values from 
hidinput_mapping_quirks() and all the quirk mapping functions, instead of 
values 0, 1 and 2.

Also, please send the patch with your Signed-off-by: line, so that I can 
merge it into my tree.

Thanks,

-- 
Jiri Kosina
SUSE Labs

      reply	other threads:[~2008-06-19  9:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 19:21 [RFC][PATCH] correct some quirks for trust 15351 bluetooth mouse Thomas Ilnseher
2008-06-19  9:14 ` Jiri Kosina [this message]

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.1.10.0806191111000.4593@jikos.suse.cz \
    --to=jkosina@suse.cz \
    --cc=illth@gmx.de \
    --cc=linux-input@vger.kernel.org \
    --cc=vojtech@ucw.cz \
    /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;
as well as URLs for NNTP newsgroup(s).