Re: [PATCH 2/3] hid: 3m: Convert to MT slots
From: Henrik Rydberg
Date: Mon Sep 20 2010 - 15:49:38 EST
On 09/20/2010 09:43 PM, Stéphane Chatty wrote:
>
> Le 28 août 10 à 16:29, Henrik Rydberg a écrit :
>
>> The Microtouch controller is capable of doing finger tracking on
>> up to 60 fingers. To reduce bandwidth and cpu usage, convert the
>> driver to use the MT slots protocol.
>
> As I understand it, this patch actually has three roles:
> 1. improving the evdev parameters of the device
> 2. cleaning the protocol to get rid of useless MISC/SCANCODE messages
> 3. convert the protocol to MT slots
>
>
>> +#define SN_MOVE 2048
>> +#define SN_WIDTH 128
>>
>
> In the long run, it might be useful to comment these signal/noise constants
>
>
>
>> hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH);
>> + input_set_capability(hi->input, EV_KEY, BTN_TOUCH);
>
>> {
>> + /* tell hid-input to skip setup of these event types */
>> if (usage->type == EV_KEY || usage->type == EV_ABS)
>> - clear_bit(usage->code, *bit);
>> -
>> - return 0;
>> + set_bit(usage->type, hi->input->evbit);
>> + return -1;
>> }
>>
>
> I understand this as a trick to get rid of MISC/SCANCODEs that are added for
> every EV_KEY message, consequence of a rule in hid-input.c. Wouldn't it be
> simpler to improve the rule than to work around it?
The main reason is to be able to set the fuzz parameters, which are otherwise
overwritten by hid-input setup.
Henrik
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/