SEMI_MT vs. simulated mt (was Re: [PATCH v3 0/4] Cypress PS/2 Trackpad driver)

2012-12-04 Thread Kamal Mostafa
Hi Dmitry and Henrik-

Regarding SEMI_MT vs. "simulated multitouch" . . .

> > 
> >   Patch #4 (new) reintroduces simulated multitouch for up to 5 fingers
> >   (#if CYPRESS_SIMULATE_MT), disabling SEMI_MT again.
> > 
> >   If that functionality (support for >2 fingers) can be acheived in some
> >   better way, please advise.


On Sun, 2012-12-02 at 23:36 -0800, Dmitry Torokhov wrote:
> You can still report true number of fingers on the pad via BTN_TOOL_*TAP
> while reporting the bounding box, the same way as Synaptics, Elantech,
> ALPS and Sentelic drivers are doing it.


On Mon, 2012-12-03 at 08:45 +0100, Henrik Rydberg wrote:
> + ret = input_mt_init_slots(input, CYTP_MAX_MT_SLOTS,
> + INPUT_MT_POINTER|INPUT_MT_DROP_UNUSED|INPUT_MT_TRACK);
> 
> Here, INPUT_MT_POINTER needs to be dropped; for semi-mt devices, the
> number of fingers is propagated separately using
> 
>input_mt_report_finger_count(dev, finger_count_as_reported_by_the_device),
> 
> which conflicts with automatic handling of pointer logic.


Well...  The forthcoming PATCH v4 version now implements all that ^^ as
you requested, but it appears that my desktop (X with Unity desktop in
Ubuntu 12.10) does not actually respond to input_mt_report_finger_count
events (e.g. BTN_TOOL_TRIPLETAP).

I asked a colleague test a couple of other semi-mt touchpads (Synaptics
and ALPS) and we found the same result:  The desktop doesn't see >2
finger events with any of these semi-mt devices, even though
'input-events' does show that the BTN_TOOL_*TAP events are in the input
stream.  (Do other X desktops actually support BTN_TOOL_*TAP?)

I understand that this may be "a userspace problem", but from my
perspective the "simulated multitouch" patch is still necessary for >2
finger tap/drag.  I have left it in my PATCH v4 set for that reason
(patch 4/4; disabled by an ifdef).  It can be included and left
disabled, or enabled, or dropped as you see fit.

 -Kamal


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


SEMI_MT vs. simulated mt (was Re: [PATCH v3 0/4] Cypress PS/2 Trackpad driver)

2012-12-04 Thread Kamal Mostafa
Hi Dmitry and Henrik-

Regarding SEMI_MT vs. simulated multitouch . . .

  
Patch #4 (new) reintroduces simulated multitouch for up to 5 fingers
(#if CYPRESS_SIMULATE_MT), disabling SEMI_MT again.
  
If that functionality (support for 2 fingers) can be acheived in some
better way, please advise.


On Sun, 2012-12-02 at 23:36 -0800, Dmitry Torokhov wrote:
 You can still report true number of fingers on the pad via BTN_TOOL_*TAP
 while reporting the bounding box, the same way as Synaptics, Elantech,
 ALPS and Sentelic drivers are doing it.


On Mon, 2012-12-03 at 08:45 +0100, Henrik Rydberg wrote:
 + ret = input_mt_init_slots(input, CYTP_MAX_MT_SLOTS,
 + INPUT_MT_POINTER|INPUT_MT_DROP_UNUSED|INPUT_MT_TRACK);
 
 Here, INPUT_MT_POINTER needs to be dropped; for semi-mt devices, the
 number of fingers is propagated separately using
 
input_mt_report_finger_count(dev, finger_count_as_reported_by_the_device),
 
 which conflicts with automatic handling of pointer logic.


Well...  The forthcoming PATCH v4 version now implements all that ^^ as
you requested, but it appears that my desktop (X with Unity desktop in
Ubuntu 12.10) does not actually respond to input_mt_report_finger_count
events (e.g. BTN_TOOL_TRIPLETAP).

I asked a colleague test a couple of other semi-mt touchpads (Synaptics
and ALPS) and we found the same result:  The desktop doesn't see 2
finger events with any of these semi-mt devices, even though
'input-events' does show that the BTN_TOOL_*TAP events are in the input
stream.  (Do other X desktops actually support BTN_TOOL_*TAP?)

I understand that this may be a userspace problem, but from my
perspective the simulated multitouch patch is still necessary for 2
finger tap/drag.  I have left it in my PATCH v4 set for that reason
(patch 4/4; disabled by an ifdef).  It can be included and left
disabled, or enabled, or dropped as you see fit.

 -Kamal


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 0/4] Cypress PS/2 Trackpad driver

2012-12-02 Thread Henrik Rydberg
Hi Kamal,

>   Patch #2 (main driver), as recommended by Henrik Rydberg[2]:
>   - use input_mt_assign_slots; drop cypress_cal_finger_id.
>   - enable 2-finger-only SEMI_MT; drop cypress_simulate_fingers.
>   - various code clean-ups.
> 
>   Henrik, does patch #2 appear to properly use assign_slots and SEMI_MT as
>   you intended?  This SEMI_MT method does work (with 2 finger support only),
>   but I'm not clear why we wouldn't want to handle >2 fingers also, so ...

It looks pretty good, please see the patch comments for details. As
Dmitry said, one can report the number of fingers separately from the
two guiding contacts, and this semi-mt behavior is well supported in
userspace.

> 
>   Patch #4 (new) reintroduces simulated multitouch for up to 5 fingers
>   (#if CYPRESS_SIMULATE_MT), disabling SEMI_MT again.
> 
>   If that functionality (support for >2 fingers) can be acheived in some
>   better way, please advise.

Yes, as above, so this patch will not be needed.

Thanks,
Henrik
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 0/4] Cypress PS/2 Trackpad driver

2012-12-02 Thread Dmitry Torokhov
Hi Kamal,

On Thu, Nov 29, 2012 at 01:57:57PM -0800, Kamal Mostafa wrote:
> This driver, submitted on behalf of Cypress Semiconductor Corporation and
> additional contributors, provides support for the Cypress PS/2 Trackpad.
> 
> This [PATCH v3] version differs from my previous submitted version[1]:
> 
>   Patch #1 (cmdbuf to 8 bytes) and #3 (link in driver) are unchanged.
> 
>   Patch #2 (main driver), as recommended by Henrik Rydberg[2]:
>   - use input_mt_assign_slots; drop cypress_cal_finger_id.
>   - enable 2-finger-only SEMI_MT; drop cypress_simulate_fingers.
>   - various code clean-ups.
> 
>   Henrik, does patch #2 appear to properly use assign_slots and SEMI_MT as
>   you intended?  This SEMI_MT method does work (with 2 finger support only),
>   but I'm not clear why we wouldn't want to handle >2 fingers also, so ...
> 
>   Patch #4 (new) reintroduces simulated multitouch for up to 5 fingers
>   (#if CYPRESS_SIMULATE_MT), disabling SEMI_MT again.
> 
>   If that functionality (support for >2 fingers) can be acheived in some
>   better way, please advise.

You can still report true number of fingers on the pad via BTN_TOOL_*TAP
while reporting the bounding box, the same way as Synaptics, Elantech,
ALPS and Sentelic drivers are doing it.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 0/4] Cypress PS/2 Trackpad driver

2012-12-02 Thread Dmitry Torokhov
Hi Kamal,

On Thu, Nov 29, 2012 at 01:57:57PM -0800, Kamal Mostafa wrote:
 This driver, submitted on behalf of Cypress Semiconductor Corporation and
 additional contributors, provides support for the Cypress PS/2 Trackpad.
 
 This [PATCH v3] version differs from my previous submitted version[1]:
 
   Patch #1 (cmdbuf to 8 bytes) and #3 (link in driver) are unchanged.
 
   Patch #2 (main driver), as recommended by Henrik Rydberg[2]:
   - use input_mt_assign_slots; drop cypress_cal_finger_id.
   - enable 2-finger-only SEMI_MT; drop cypress_simulate_fingers.
   - various code clean-ups.
 
   Henrik, does patch #2 appear to properly use assign_slots and SEMI_MT as
   you intended?  This SEMI_MT method does work (with 2 finger support only),
   but I'm not clear why we wouldn't want to handle 2 fingers also, so ...
 
   Patch #4 (new) reintroduces simulated multitouch for up to 5 fingers
   (#if CYPRESS_SIMULATE_MT), disabling SEMI_MT again.
 
   If that functionality (support for 2 fingers) can be acheived in some
   better way, please advise.

You can still report true number of fingers on the pad via BTN_TOOL_*TAP
while reporting the bounding box, the same way as Synaptics, Elantech,
ALPS and Sentelic drivers are doing it.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 0/4] Cypress PS/2 Trackpad driver

2012-12-02 Thread Henrik Rydberg
Hi Kamal,

   Patch #2 (main driver), as recommended by Henrik Rydberg[2]:
   - use input_mt_assign_slots; drop cypress_cal_finger_id.
   - enable 2-finger-only SEMI_MT; drop cypress_simulate_fingers.
   - various code clean-ups.
 
   Henrik, does patch #2 appear to properly use assign_slots and SEMI_MT as
   you intended?  This SEMI_MT method does work (with 2 finger support only),
   but I'm not clear why we wouldn't want to handle 2 fingers also, so ...

It looks pretty good, please see the patch comments for details. As
Dmitry said, one can report the number of fingers separately from the
two guiding contacts, and this semi-mt behavior is well supported in
userspace.

 
   Patch #4 (new) reintroduces simulated multitouch for up to 5 fingers
   (#if CYPRESS_SIMULATE_MT), disabling SEMI_MT again.
 
   If that functionality (support for 2 fingers) can be acheived in some
   better way, please advise.

Yes, as above, so this patch will not be needed.

Thanks,
Henrik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/