RE: [Patch v2] input:rohm based bu21013 touch panel controller driver support

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

 



Hi Henrik,

Thanks for your comments.

> >>> +static bool bu21013_verify_delta(int x1, int y1, int x2, int y2)
> >>> +{
> >>> +       int delta_x, delta_y;
> >>> +
> >>> +       if ((x1 != 0) && (y1 != 0)) {
> >>> +               delta_x = x2 - x1;
> >>> +               if (x1 > x2)
> >>> +                       delta_x = x1 - x2;
> >>> +               delta_y = y2 - y1;
> >>> +               if (y1 > y2)
> >>> +                       delta_y = y1 - y2;
> >>> +               if ((delta_x < DELTA_MIN) || (delta_y < DELTA_MIN))
> >>> +                       return false;
> >>> +       }
> >>> +       return true;
> >>
> >> Hmm, I remember - the fuzz handling indeed will not work for MT A
> protocol.
> >> Still, I do not think it is correct. Don't you need to do
> >> "abs(delta_x) < DELTA_MIN"?
> 
> 
> True, fuzz wont be processed in the kernel, but the information can be
> used
> outside the kernel, like in mtdev.
> 
> I do not understand why deltas are verified in the first place. Either
> one can
> rely on the identity of the fingers, in which case MT slots is simpler
> to
> handle, or one cannot rely on it, in which case the above code is
> wrong, since
> it assumes the values compared have the same identity.
> 

	This case according to controller specification, when the two fingers delta is of
	16 either in x or y, we should ignore those co-ordinates and report as pen-up.


> Perhaps the logic could be inverted so that the case when the total
> number is
> zero is treated first, to avoid repeated tests below.
> 
> >>> +               if ((finger2_pos_x != 0) && (finger2_pos_y != 0)) {
> >>> +                       if ((finger1_pos_x == 0) || (finger1_pos_y
> == 0))
> >>> +                               return 0;
> 
> 
> So zero is some kind of null value? No continuation here?
> 
> >>> +                       ret = bu21013_verify_delta(finger1_pos_x,
> >>> +                               finger1_pos_y, finger2_pos_x,
> finger2_pos_y);
> >>> +                       if (!ret)
> >>> +                               total_number_of_active_sensors = 0;
> >>> +               }
> 
> 
> So this is a tracking-plus-filtering solution? Unless the form factor
> forbids
> it, having driver-specific tracking solutions in the kernel is not
> encouraged.
> Two fingers might be borderline.
	
	We need to keep this filtering solution according to the controller specification.

Thanks & Regards,
Naveen
--
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