Re: [PATCH] HID: fix horizontal wheel for ms comfort mouse 4500

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux