Re: [PATCH 4/4] input - wacom: Support 2FGT in MT format

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

 



> >> +static int wacom_tpc_mt_touch(struct wacom_wac *wacom)
> >> +{
> >> +     struct input_dev *input = wacom->input;
> >> +     unsigned char *data = wacom->data;
> >> +     int i;
> >> +
> >> +     if (wacom->shared->stylus_in_proximity && !wacom->shared->touch_down)
> >> +             return 0;
> >
> > Seeing one case handled out of four possible always makes me nervous.
> 
> The above statement is to avoid going through the input_mt_slot and
> input_mt_report_slot_state routines without posting any meaningful
> events. I guess it could be considered as a performance enhancement?

It won't be posting events unless something changed.

> Which case makes you nervous? I'll take care of it ;).

Well, removing the logic above would suffice. :-)

> > So only false->true is possible here.
> 
> Yeah, both are bools. What else can they take?

Only the transition false-to-true, that is.

> > What I can see from the patchset, only wacom_tpc_single_touch() will ever set touch_down to
> > false. Is that sufficient?
> 
> No,  wacom_tpc_mt_touch can set touch_down to false too. When touch is
> false, touch_down will be false. This happens when pen in prox or when
> both fingers are up.

Now, that is what cannot happen, because of the max() function.
 
> Where else do you see it can be changed? tpc_pen() can not do that
> since it is on a different port, that's the reason of touch_down.

Thanks,
Henrik
--
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