Re: [PATCH v2 1/3] Input: synaptics-rmi4 - add F11 capabilities for touchpads

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

 



On Mon, Mar 31, 2014 at 5:11 PM, Christopher Heiny <cheiny@xxxxxxxxxxxxx> wrote:
> When the device is a touchpad additional capabilities need to
> be set and reported.
>
> Signed-off-by: Andrew Duggan <aduggan@xxxxxxxxxxxxx>
> Acked-by: Christopher Heiny <cheiny@xxxxxxxxxxxxx>
> Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> Cc: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx>
> Cc: Linux Walleij <linus.walleij@xxxxxxxxxx>
> Cc: David Herrmann <dh.herrmann@xxxxxxxxx>
> Cc: Jiri Kosina <jkosina@xxxxxxx>
>
> ---
>  drivers/input/rmi4/rmi_f11.c | 23 +++++++++++++++--------
>  1 file changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
> index 8709abe..92eac8a 100644
> --- a/drivers/input/rmi4/rmi_f11.c
> +++ b/drivers/input/rmi4/rmi_f11.c
> @@ -717,7 +717,7 @@ static void rmi_f11_finger_handler(struct f11_data *f11,
>                 if (sensor->data.rel_pos)
>                         rmi_f11_rel_pos_report(sensor, i);
>         }
> -       input_mt_sync(sensor->input);
> +       input_mt_sync_frame(sensor->input);

Small nitpicking here: I think we should add an if (!sensor->type_a)
before this statement.
However, it should still be harmless for protocol A device because
input->mt is null.

So Reviewed-by: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx> for this one.

Also I wanted to apologize regarding the rebase I asked for in the v1,
it looks like I hallucinated because the synaptics-rmi4 branch is
plugged to a v3.7-rc+ and contains the multitouch changes I said that
were not in.

Cheers,
Benjamin

>         input_sync(sensor->input);
>  }
>
> @@ -1104,13 +1104,10 @@ static void f11_set_abs_params(struct rmi_function *fn, struct f11_data *f11)
>         /* We assume touchscreen unless demonstrably a touchpad or specified
>          * as a touchpad in the platform data
>          */
> -       if (sensor->sensor_type == rmi_f11_sensor_touchpad ||
> -                       (sensor->sens_query.has_info2 &&
> -                               !sensor->sens_query.is_clear))
> -               input_flags = INPUT_PROP_POINTER;
> +       if (sensor->sensor_type == rmi_f11_sensor_touchpad)
> +               input_flags = INPUT_MT_POINTER;
>         else
> -               input_flags = INPUT_PROP_DIRECT;
> -       set_bit(input_flags, input->propbit);
> +               input_flags = INPUT_MT_DIRECT;
>
>         if (sensor->axis_align.swap_axes) {
>                 int temp = device_x_max;
> @@ -1220,11 +1217,20 @@ static int rmi_f11_initialize(struct rmi_function *fn)
>                 return rc;
>         }
>
> +       if (sensor->sens_query.has_info2) {
> +               if (sensor->sens_query.is_clear)
> +                       sensor->sensor_type = rmi_f11_sensor_touchscreen;
> +               else
> +                       sensor->sensor_type = rmi_f11_sensor_touchpad;
> +       }
> +
>         if (pdata->f11_sensor_data) {
>                 sensor->axis_align =
>                         pdata->f11_sensor_data->axis_align;
>                 sensor->type_a = pdata->f11_sensor_data->type_a;
> -               sensor->sensor_type =
> +
> +               if (sensor->sensor_type == rmi_f11_sensor_default)
> +                       sensor->sensor_type =
>                                 pdata->f11_sensor_data->sensor_type;
>         }
>
> @@ -1490,6 +1496,7 @@ static struct rmi_function_handler rmi_f11_handler = {
>  module_rmi_driver(rmi_f11_handler);
>
>  MODULE_AUTHOR("Christopher Heiny <cheiny@xxxxxxxxxxxxx");
> +MODULE_AUTHOR("Andrew Duggan <aduggan@xxxxxxxxxxxxx");
>  MODULE_DESCRIPTION("RMI F11 module");
>  MODULE_LICENSE("GPL");
>  MODULE_VERSION(RMI_DRIVER_VERSION);
> --
> 1.8.3.2
>
> --
> 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
--
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