Re: [PATCH 1/3] input: mt: Simplify event bypass logic

From: Henrik Rydberg
Date: Fri May 14 2010 - 04:19:21 EST


Dmitry Torokhov wrote:
> On Sat, May 01, 2010 at 03:49:39PM +0200, Henrik Rydberg wrote:
>> The input bypass mechanism is only used by the MT events. Since all
>> MT events use bypassing by construction, the current list is a mere
>> duplication of input.h. This patch replaces the bypass list by a
>> simple range test.
>>
>
> Henrik,
>
> I disagree with the patch. I can not guarantee that we will be able to
> maintain continuous range of ABS_MT_* events and thus current scheme is
> more flexible.

Coming back to this, the current scheme has problems, too.

With the introduction of slots, all events, not only EV_ABS events, are
implicitly partitioned into global events and per-slot events. In the current
approach, the partitioning is controlled via the hidden list in input.c, and
hinted using the prefix MT. However, expecting the usage of slots to grow
outside of a linear range of EV_ABS events, the user will inevitably need to
known the semantics of particular events in order to parse correctly. And once
the user starts to deal with that information, it can just as well be dynamic,
and controlled by the device driver.

My proposition is to add a bit field in input_dev which controls whether a
particular event is used in the slot context or the global context. This
information should be user-readable via EVIO. The driver should be able to alter
these settings, and the default should match the current behavior.

Thoughts?

Cheers,
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/