Re: [RFC PATCH 06/06] input/rmi4: F11 - 2D touch interface

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

 



Hi Christopher,

I did not made a full review, but at least, there is a problem in your
rmi_f11_finger_handler function:

On Sat, Nov 17, 2012 at 4:58 AM, Christopher Heiny <cheiny@xxxxxxxxxxxxx> wrote:
> rmi_f11.c is a driver for 2D touch sensors using the RMI4 protocol.  It supports
> both touchscreen and touchpad input, in both absolute and relative formats.
> Support for Type-B multitouch is the default, Type-A support is included for
> certain legacy sensors.
>
>
> Signed-off-by: Christopher Heiny <cheiny@xxxxxxxxxxxxx>
>
> To: Henrik Rydberg <rydberg@xxxxxxxxxxx>
> Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> Cc: Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>
> Cc: Naveen Kumar Gaddipati <naveen.gaddipati@xxxxxxxxxxxxxx>
> Cc: Joeri de Gram <j.de.gram@xxxxxxxxx>
>
> ---
>
>  drivers/input/rmi4/rmi_f11.c | 2813 ++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 2813 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
> new file mode 100644
> index 0000000..b9a84bc
> --- /dev/null
> +++ b/drivers/input/rmi4/rmi_f11.c
[snipped]
> +static void rmi_f11_finger_handler(struct f11_data *f11,
> +                                  struct f11_2d_sensor *sensor)
> +{
> +       const u8 *f_state = sensor->data.f_state;
> +       u8 finger_state;
> +       u8 finger_pressed_count;
> +       u8 i;
> +
> +       for (i = 0, finger_pressed_count = 0; i < sensor->nbr_fingers; i++) {
> +               /* Possible of having 4 fingers per f_statet register */
> +               finger_state = (f_state[i / 4] >> (2 * (i % 4))) &
> +                                       FINGER_STATE_MASK;
> +               if (finger_state == F11_RESERVED) {
> +                       pr_err("%s: Invalid finger state[%d]:0x%02x.", __func__,
> +                                       i, finger_state);
> +                       continue;
> +               } else if ((finger_state == F11_PRESENT) ||
> +                               (finger_state == F11_INACCURATE)) {
> +                       finger_pressed_count++;
> +               }
> +
> +               if (sensor->data.abs_pos)
> +                       rmi_f11_abs_pos_report(f11, sensor, finger_state, i);
> +
> +               if (sensor->data.rel_pos)
> +                       rmi_f11_rel_pos_report(sensor, i);
> +       }
> +       input_mt_sync(sensor->input);

This should be "input_mt_sync_frame(sensor->input);"
otherwise, the synaptics xorg driver won't handle the touchpad correctly.

Cheers,
Benjamin

> +       input_sync(sensor->input);
> +}
> +
[snipped]
--
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