* [PATCH] HID: wacom: do not directly use input_mt_report_pointer_emulation
@ 2015-02-17 19:19 Benjamin Tissoires
2015-02-17 22:36 ` Ping Cheng
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Tissoires @ 2015-02-17 19:19 UTC (permalink / raw)
To: Jiri Kosina, Ping Cheng, Jason Gerecke; +Cc: linux-input, linux-kernel
input_mt_sync_frame() calls input_mt_report_pointer_emulation() and do
some internal steps required to keep in sync the state of the touch within
the various reports.
Given that we use input_mt_assign_slot() in this driver, it is better to
use input_mt_sync_frame().
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
drivers/hid/wacom_wac.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 8627581..de93968 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -1093,7 +1093,7 @@ static int wacom_24hdt_irq(struct wacom_wac *wacom)
}
}
}
- input_mt_report_pointer_emulation(input, true);
+ input_mt_sync_frame(input);
wacom->num_contacts_left -= contacts_to_send;
if (wacom->num_contacts_left <= 0)
@@ -1144,7 +1144,7 @@ static int wacom_mt_touch(struct wacom_wac *wacom)
input_report_abs(input, ABS_MT_POSITION_Y, y);
}
}
- input_mt_report_pointer_emulation(input, true);
+ input_mt_sync_frame(input);
wacom->num_contacts_left -= contacts_to_send;
if (wacom->num_contacts_left < 0)
@@ -1176,7 +1176,7 @@ static int wacom_tpc_mt_touch(struct wacom_wac *wacom)
contact_with_no_pen_down_count++;
}
}
- input_mt_report_pointer_emulation(input, true);
+ input_mt_sync_frame(input);
/* keep touch state for pen event */
wacom->shared->touch_down = (contact_with_no_pen_down_count > 0);
@@ -1638,7 +1638,7 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
}
}
- input_mt_report_pointer_emulation(input, true);
+ input_mt_sync_frame(input);
input_report_key(pad_input, BTN_LEFT, (data[1] & 0x08) != 0);
input_report_key(pad_input, BTN_FORWARD, (data[1] & 0x04) != 0);
@@ -1728,7 +1728,7 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
wacom_bpt3_button_msg(wacom, data + offset);
}
- input_mt_report_pointer_emulation(input, true);
+ input_mt_sync_frame(input);
return 1;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: wacom: do not directly use input_mt_report_pointer_emulation
2015-02-17 19:19 [PATCH] HID: wacom: do not directly use input_mt_report_pointer_emulation Benjamin Tissoires
@ 2015-02-17 22:36 ` Ping Cheng
2015-02-17 22:50 ` Benjamin Tissoires
0 siblings, 1 reply; 4+ messages in thread
From: Ping Cheng @ 2015-02-17 22:36 UTC (permalink / raw)
To: Benjamin Tissoires; +Cc: Jiri Kosina, Jason Gerecke, linux-input, linux-kernel
On Tue, Feb 17, 2015 at 11:19 AM, Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
> input_mt_sync_frame() calls input_mt_report_pointer_emulation() and do
> some internal steps required to keep in sync the state of the touch within
> the various reports.
>
> Given that we use input_mt_assign_slot() in this driver, it is better to
> use input_mt_sync_frame().
It is sensible to me, except I think you meant input_mt_slot() instead
of input_mt_assign_slot().
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Ping
> ---
> drivers/hid/wacom_wac.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
> index 8627581..de93968 100644
> --- a/drivers/hid/wacom_wac.c
> +++ b/drivers/hid/wacom_wac.c
> @@ -1093,7 +1093,7 @@ static int wacom_24hdt_irq(struct wacom_wac *wacom)
> }
> }
> }
> - input_mt_report_pointer_emulation(input, true);
> + input_mt_sync_frame(input);
>
> wacom->num_contacts_left -= contacts_to_send;
> if (wacom->num_contacts_left <= 0)
> @@ -1144,7 +1144,7 @@ static int wacom_mt_touch(struct wacom_wac *wacom)
> input_report_abs(input, ABS_MT_POSITION_Y, y);
> }
> }
> - input_mt_report_pointer_emulation(input, true);
> + input_mt_sync_frame(input);
>
> wacom->num_contacts_left -= contacts_to_send;
> if (wacom->num_contacts_left < 0)
> @@ -1176,7 +1176,7 @@ static int wacom_tpc_mt_touch(struct wacom_wac *wacom)
> contact_with_no_pen_down_count++;
> }
> }
> - input_mt_report_pointer_emulation(input, true);
> + input_mt_sync_frame(input);
>
> /* keep touch state for pen event */
> wacom->shared->touch_down = (contact_with_no_pen_down_count > 0);
> @@ -1638,7 +1638,7 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
> }
> }
>
> - input_mt_report_pointer_emulation(input, true);
> + input_mt_sync_frame(input);
>
> input_report_key(pad_input, BTN_LEFT, (data[1] & 0x08) != 0);
> input_report_key(pad_input, BTN_FORWARD, (data[1] & 0x04) != 0);
> @@ -1728,7 +1728,7 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
> wacom_bpt3_button_msg(wacom, data + offset);
>
> }
> - input_mt_report_pointer_emulation(input, true);
> + input_mt_sync_frame(input);
>
> return 1;
> }
> --
> 2.1.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: wacom: do not directly use input_mt_report_pointer_emulation
2015-02-17 22:36 ` Ping Cheng
@ 2015-02-17 22:50 ` Benjamin Tissoires
2015-02-18 22:43 ` Jiri Kosina
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Tissoires @ 2015-02-17 22:50 UTC (permalink / raw)
To: Ping Cheng
Cc: Benjamin Tissoires, Jiri Kosina, Jason Gerecke, linux-input,
linux-kernel
On Tue, Feb 17, 2015 at 5:36 PM, Ping Cheng <pinglinux@gmail.com> wrote:
> On Tue, Feb 17, 2015 at 11:19 AM, Benjamin Tissoires
> <benjamin.tissoires@redhat.com> wrote:
>> input_mt_sync_frame() calls input_mt_report_pointer_emulation() and do
>> some internal steps required to keep in sync the state of the touch within
>> the various reports.
>>
>> Given that we use input_mt_assign_slot() in this driver, it is better to
>> use input_mt_sync_frame().
>
> It is sensible to me, except I think you meant input_mt_slot() instead
> of input_mt_assign_slot().
Hehe, I should have actually checked the call. I meant
input_mt_get_slot_by_key().
>
>> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>
> Reviewed-by: Ping Cheng <pingc@wacom.com>
Thanks!
Benjamin
>
> Ping
>
>> ---
>> drivers/hid/wacom_wac.c | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
>> index 8627581..de93968 100644
>> --- a/drivers/hid/wacom_wac.c
>> +++ b/drivers/hid/wacom_wac.c
>> @@ -1093,7 +1093,7 @@ static int wacom_24hdt_irq(struct wacom_wac *wacom)
>> }
>> }
>> }
>> - input_mt_report_pointer_emulation(input, true);
>> + input_mt_sync_frame(input);
>>
>> wacom->num_contacts_left -= contacts_to_send;
>> if (wacom->num_contacts_left <= 0)
>> @@ -1144,7 +1144,7 @@ static int wacom_mt_touch(struct wacom_wac *wacom)
>> input_report_abs(input, ABS_MT_POSITION_Y, y);
>> }
>> }
>> - input_mt_report_pointer_emulation(input, true);
>> + input_mt_sync_frame(input);
>>
>> wacom->num_contacts_left -= contacts_to_send;
>> if (wacom->num_contacts_left < 0)
>> @@ -1176,7 +1176,7 @@ static int wacom_tpc_mt_touch(struct wacom_wac *wacom)
>> contact_with_no_pen_down_count++;
>> }
>> }
>> - input_mt_report_pointer_emulation(input, true);
>> + input_mt_sync_frame(input);
>>
>> /* keep touch state for pen event */
>> wacom->shared->touch_down = (contact_with_no_pen_down_count > 0);
>> @@ -1638,7 +1638,7 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
>> }
>> }
>>
>> - input_mt_report_pointer_emulation(input, true);
>> + input_mt_sync_frame(input);
>>
>> input_report_key(pad_input, BTN_LEFT, (data[1] & 0x08) != 0);
>> input_report_key(pad_input, BTN_FORWARD, (data[1] & 0x04) != 0);
>> @@ -1728,7 +1728,7 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
>> wacom_bpt3_button_msg(wacom, data + offset);
>>
>> }
>> - input_mt_report_pointer_emulation(input, true);
>> + input_mt_sync_frame(input);
>>
>> return 1;
>> }
>> --
>> 2.1.0
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: wacom: do not directly use input_mt_report_pointer_emulation
2015-02-17 22:50 ` Benjamin Tissoires
@ 2015-02-18 22:43 ` Jiri Kosina
0 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2015-02-18 22:43 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Ping Cheng, Benjamin Tissoires, Jason Gerecke, linux-input, linux-kernel
On Tue, 17 Feb 2015, Benjamin Tissoires wrote:
> On Tue, Feb 17, 2015 at 5:36 PM, Ping Cheng <pinglinux@gmail.com> wrote:
> > On Tue, Feb 17, 2015 at 11:19 AM, Benjamin Tissoires
> > <benjamin.tissoires@redhat.com> wrote:
> >> input_mt_sync_frame() calls input_mt_report_pointer_emulation() and do
> >> some internal steps required to keep in sync the state of the touch within
> >> the various reports.
> >>
> >> Given that we use input_mt_assign_slot() in this driver, it is better to
> >> use input_mt_sync_frame().
> >
> > It is sensible to me, except I think you meant input_mt_slot() instead
> > of input_mt_assign_slot().
>
> Hehe, I should have actually checked the call. I meant
> input_mt_get_slot_by_key().
>
> >
> >> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> >
> > Reviewed-by: Ping Cheng <pingc@wacom.com>
Applied (with adjusted changelog).
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-18 22:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-17 19:19 [PATCH] HID: wacom: do not directly use input_mt_report_pointer_emulation Benjamin Tissoires
2015-02-17 22:36 ` Ping Cheng
2015-02-17 22:50 ` Benjamin Tissoires
2015-02-18 22:43 ` Jiri Kosina
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.