Skip to contentSkip to conversation

HID: wacom: do not directly use input_mt_report_pointer_emulation

PATCH In review Benjamin Tissoires 4 participants 4 messages Feb 17, 2015 – Feb 18, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: wacom: do not directly use input_mt_report_pointer_emulation

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().

---
 drivers/hid/wacom_wac.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/hid/wacom_wac.c +5 -5
index 8627581..de93968 100644
@@ -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;
 }
Signature · 1 line
2.1.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Benjamin Tissoires

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().

Quoted 1 line

Ping

Quoted 56 lines
---
 drivers/hid/wacom_wac.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/hid/wacom_wac.c +5 -6
index 8627581..de93968 100644
@@ -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

#2 lore raw
Quoted 11 lines · Ping Cheng
Quoted 6 lines · Benjamin Tissoires

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().

Quoted 4 lines
Quoted 2 lines

Thanks!
Benjamin

Quoted 63 lines

Ping

Quoted 54 lines
---
 drivers/hid/wacom_wac.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/hid/wacom_wac.c +5 -6
index 8627581..de93968 100644
@@ -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;
 }
--
Quoted 2 lines

2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 7 lines · Benjamin Tissoires
Quoted 6 lines · Ping Cheng
Quoted 4 lines · Benjamin Tissoires

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.

Quoted 13 lines
Quoted 5 lines
Quoted 2 lines

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().

Quoted 4 lines
Quoted 2 lines

Applied (with adjusted changelog).

Signature · 2 lines
Jiri Kosina
SUSE Labs