Re: [PATCH 2/5] HID: hid-multitouch: get maxcontacts also fromlogical_max value
From: Henrik Rydberg
Date: Thu May 10 2012 - 08:41:24 EST
> > As long as all existing devices are unaffected, it's fine, hence the question.
> I checked all the reports descriptors that I have.
> 2 devices (one Stantum and one Irtouch) present an unrealistic
> logical_max value (255). The thing is that if this logical_max is
> false, and if the value is not provided, then I don't know how could I
> retrieve the right value beside introducing a MT_CLS...
> Henrik, do you think that 255 is two much for the slots?
It is large enough for us to start worrying about how we manage
memory, not to mention throughput. Since we do not really have devices
of that type yet, how about adding a MT_MAX_MAXCONTACT next to
MT_DEFAULT_MAXCONTACT, and use it as a sanity check, like so:
if (!td->maxcontacts && field->logical_maximum <= MT_MAX_MAXCONTACT)
td->maxcontacts = field->logical_maximum;
Then the default (10) would be picked for the suspect devices, just as
it is today.
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/