lkml.org 
[lkml]   [2011]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Linux USB HID should ignore values outside Logical Minimum/Maximum range
From
Date
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 */


> <SNIP>

Thanks,
-- chf


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-10-24 19:05    [W:0.076 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site