From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Christoph Fritz <chf.fritz@googlemail.com>
Cc: "Denilson Figueiredo de Sá" <denilsonsa@gmail.com>,
linux-kernel@vger.kernel.org, "Jiri Kosina" <jkosina@suse.cz>,
linux-input@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: Linux USB HID should ignore values outside Logical Minimum/Maximum range
Date: Mon, 24 Oct 2011 13:32:04 -0700 [thread overview]
Message-ID: <20111024203204.GA31721@core.coreip.homeip.net> (raw)
In-Reply-To: <1319476183.3210.12.camel@lovely>
Hi Christoph,
On Mon, Oct 24, 2011 at 07:09:43PM +0200, Christoph Fritz wrote:
> Hi Denilson,
>
> please see my comment below.
>
> On Sat, 2011-10-22 at 09:42 -0200, Denilson Figueiredo de Sá wrote:
> > Short description:
> >
> > An absolute pointing device using USB HID defines a LOGICAL_MINIMUM and
> > a LOGICAL_MAXIMUM for X, Y axes, and then sends a HID report containing
> > values outside that range.
> >
> > Linux kernel should ignore values outside that range, as they are not
> > meaningful.
>
> To answer with a quote from the comment above input.h:"struct
> input_absinfo":
>
> *
> * Note that input core does not clamp reported values to the
> * [minimum, maximum] limits, such task is left to userspace.
> *
>
> to do so, use this from input.h:
>
> #define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */
> #define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo) /* set abs value/limits */
While input core does not clam or validate the values reported by the
driver it might make sense to do so in hid-input; I am not sure how
often these limits programmed intorrectly. Jiri i sprobably the best
person to answer this question.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2011-10-24 20:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-22 11:42 Linux USB HID should ignore values outside Logical Minimum/Maximum range Denilson Figueiredo de Sá
2011-10-24 16:24 ` Chris Friesen
2011-10-24 16:24 ` Chris Friesen
2011-10-24 16:39 ` Denilson Figueiredo de Sá
2011-10-24 16:39 ` Denilson Figueiredo de Sá
2011-10-24 20:35 ` Dmitry Torokhov
2011-10-25 4:03 ` Denilson Figueiredo de Sá
2011-10-25 4:03 ` Denilson Figueiredo de Sá
2011-10-24 17:09 ` Christoph Fritz
2011-10-24 17:09 ` Christoph Fritz
2011-10-24 17:04 ` Denilson Figueiredo de Sá
2011-10-24 20:32 ` Dmitry Torokhov [this message]
2011-10-28 16:23 ` Jiri Kosina
2011-10-28 16:23 ` Jiri Kosina
2011-10-28 19:27 ` Christoph Fritz
2011-10-28 19:27 ` Christoph Fritz
2011-10-28 20:40 ` Denilson Figueiredo de Sá
2011-10-31 15:24 ` Jiri Kosina
2011-10-31 15:24 ` Jiri Kosina
2011-11-02 23:39 ` Denilson Figueiredo de Sá
2011-11-16 14:01 ` Jiri Kosina
2011-11-16 14:01 ` 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=20111024203204.GA31721@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=chf.fritz@googlemail.com \
--cc=denilsonsa@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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.