aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Duggan <aduggan@synaptics.com>2015-02-24 20:36:49 -0500
committerJiri Kosina <jkosina@suse.cz>2015-02-25 09:26:44 -0500
commit05ba999fcabb747214d177279de55f00a74850d4 (patch)
treeb317b87cd4941357810a899725b515f4fcff5a63
parentdd8df28459dcad4da5dec94d12801b149a895c36 (diff)
HID: rmi: disable dribble packets on Synaptics touchpads
When a finger is lifted from a Synaptics touchpad the firmware will continue to interrupts for up to a second. These additional interrupts are know and dribble interrupts. Since the data read from the touchpad does not change the input subsystem only reports a single event. This makes the servicing of dribble interrupts on Linux unnecessary. This patch simply disables dribble interupts when configuring the touchpad. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Tested-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/hid-rmi.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
index e2a43a1d3aa3..6e74eae6b652 100644
--- a/drivers/hid/hid-rmi.c
+++ b/drivers/hid/hid-rmi.c
@@ -751,6 +751,7 @@ static int rmi_populate_f11(struct hid_device *hdev)
751 bool has_gestures; 751 bool has_gestures;
752 bool has_rel; 752 bool has_rel;
753 bool has_data40 = false; 753 bool has_data40 = false;
754 bool has_dribble = false;
754 unsigned x_size, y_size; 755 unsigned x_size, y_size;
755 u16 query_offset; 756 u16 query_offset;
756 757
@@ -792,6 +793,14 @@ static int rmi_populate_f11(struct hid_device *hdev)
792 has_rel = !!(buf[0] & BIT(3)); 793 has_rel = !!(buf[0] & BIT(3));
793 has_gestures = !!(buf[0] & BIT(5)); 794 has_gestures = !!(buf[0] & BIT(5));
794 795
796 ret = rmi_read(hdev, data->f11.query_base_addr + 5, buf);
797 if (ret) {
798 hid_err(hdev, "can not get absolute data sources: %d.\n", ret);
799 return ret;
800 }
801
802 has_dribble = !!(buf[0] & BIT(4));
803
795 /* 804 /*
796 * At least 4 queries are guaranteed to be present in F11 805 * At least 4 queries are guaranteed to be present in F11
797 * +1 for query 5 which is present since absolute events are 806 * +1 for query 5 which is present since absolute events are
@@ -908,6 +917,16 @@ static int rmi_populate_f11(struct hid_device *hdev)
908 data->max_x = buf[6] | (buf[7] << 8); 917 data->max_x = buf[6] | (buf[7] << 8);
909 data->max_y = buf[8] | (buf[9] << 8); 918 data->max_y = buf[8] | (buf[9] << 8);
910 919
920 if (has_dribble) {
921 buf[0] = buf[0] & ~BIT(6);
922 ret = rmi_write(hdev, data->f11.control_base_addr, buf);
923 if (ret) {
924 hid_err(hdev, "can not write to control reg 0: %d.\n",
925 ret);
926 return ret;
927 }
928 }
929
911 return 0; 930 return 0;
912} 931}
913 932