History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov: "A fix (revert) for a recent regression in Synaptics driver and a fix for Elan i2c touchpad driver" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Revert "Input: synaptics - allocate 3 slots to keep stability in image sensors" Input: elan_i2c - change the hover event from MT to ST

Linus Torvalds committed 11 years ago

Commit 8a7b8ff2 parents 4322f02 dbf3c372 files · +6 −8Browse files

Unified · Split

2 files
  1. drivers/input/mouse/elan_i2c_core.c +5 −7
  2. drivers/input/mouse/synaptics.c +1 −1
drivers/input/mouse/elan_i2c_core.c+5−7
@@ -771,7 +771,7 @@ static const struct attribute_group *elan_sysfs_groups[] = { · 770 unmodified lines
771 */771 */
772static void elan_report_contact(struct elan_tp_data *data,772static void elan_report_contact(struct elan_tp_data *data,
773 int contact_num, bool contact_valid,773 int contact_num, bool contact_valid,
774 bool hover_event, u8 *finger_data)774 u8 *finger_data)
775{775{
776 struct input_dev *input = data->input;776 struct input_dev *input = data->input;
777 unsigned int pos_x, pos_y;777 unsigned int pos_x, pos_y;
@@ -815,9 +815,7 @@ static void elan_report_contact(struct elan_tp_data *data, · 37 unmodified lines
815 input_mt_report_slot_state(input, MT_TOOL_FINGER, true);815 input_mt_report_slot_state(input, MT_TOOL_FINGER, true);
816 input_report_abs(input, ABS_MT_POSITION_X, pos_x);816 input_report_abs(input, ABS_MT_POSITION_X, pos_x);
817 input_report_abs(input, ABS_MT_POSITION_Y, data->max_y - pos_y);817 input_report_abs(input, ABS_MT_POSITION_Y, data->max_y - pos_y);
818 input_report_abs(input, ABS_MT_DISTANCE, hover_event);818 input_report_abs(input, ABS_MT_PRESSURE, scaled_pressure);
819 input_report_abs(input, ABS_MT_PRESSURE,
820 hover_event ? 0 : scaled_pressure);
821 input_report_abs(input, ABS_TOOL_WIDTH, mk_x);819 input_report_abs(input, ABS_TOOL_WIDTH, mk_x);
822 input_report_abs(input, ABS_MT_TOUCH_MAJOR, major);820 input_report_abs(input, ABS_MT_TOUCH_MAJOR, major);
823 input_report_abs(input, ABS_MT_TOUCH_MINOR, minor);821 input_report_abs(input, ABS_MT_TOUCH_MINOR, minor);
@@ -839,14 +837,14 @@ static void elan_report_absolute(struct elan_tp_data *data, u8 *packet) · 15 unmodified lines
839 hover_event = hover_info & 0x40;837 hover_event = hover_info & 0x40;
840 for (i = 0; i < ETP_MAX_FINGERS; i++) {838 for (i = 0; i < ETP_MAX_FINGERS; i++) {
841 contact_valid = tp_info & (1U << (3 + i));839 contact_valid = tp_info & (1U << (3 + i));
842 elan_report_contact(data, i, contact_valid, hover_event,840 elan_report_contact(data, i, contact_valid, finger_data);
843 finger_data);
844 841
845 if (contact_valid)842 if (contact_valid)
846 finger_data += ETP_FINGER_DATA_LEN;843 finger_data += ETP_FINGER_DATA_LEN;
847 }844 }
848 845
849 input_report_key(input, BTN_LEFT, tp_info & 0x01);846 input_report_key(input, BTN_LEFT, tp_info & 0x01);
847 input_report_abs(input, ABS_DISTANCE, hover_event != 0);
850 input_mt_report_pointer_emulation(input, true);848 input_mt_report_pointer_emulation(input, true);
851 input_sync(input);849 input_sync(input);
852}850}
@@ -922,6 +920,7 @@ static int elan_setup_input_device(struct elan_tp_data *data) · 69 unmodified lines
922 input_abs_set_res(input, ABS_Y, data->y_res);920 input_abs_set_res(input, ABS_Y, data->y_res);
923 input_set_abs_params(input, ABS_PRESSURE, 0, ETP_MAX_PRESSURE, 0, 0);921 input_set_abs_params(input, ABS_PRESSURE, 0, ETP_MAX_PRESSURE, 0, 0);
924 input_set_abs_params(input, ABS_TOOL_WIDTH, 0, ETP_FINGER_WIDTH, 0, 0);922 input_set_abs_params(input, ABS_TOOL_WIDTH, 0, ETP_FINGER_WIDTH, 0, 0);
923 input_set_abs_params(input, ABS_DISTANCE, 0, 1, 0, 0);
925 924
926 /* And MT parameters */925 /* And MT parameters */
927 input_set_abs_params(input, ABS_MT_POSITION_X, 0, data->max_x, 0, 0);926 input_set_abs_params(input, ABS_MT_POSITION_X, 0, data->max_x, 0, 0);
@@ -934,7 +933,6 @@ static int elan_setup_input_device(struct elan_tp_data *data) · 6 unmodified lines
934 ETP_FINGER_WIDTH * max_width, 0, 0);933 ETP_FINGER_WIDTH * max_width, 0, 0);
935 input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0,934 input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0,
936 ETP_FINGER_WIDTH * min_width, 0, 0);935 ETP_FINGER_WIDTH * min_width, 0, 0);
937 input_set_abs_params(input, ABS_MT_DISTANCE, 0, 1, 0, 0);
938 936
939 data->input = input;937 data->input = input;
940 938
drivers/input/mouse/synaptics.c+1−1
@@ -1199,7 +1199,7 @@ static void set_input_params(struct psmouse *psmouse, · 1198 unmodified lines
1199 ABS_MT_POSITION_Y);1199 ABS_MT_POSITION_Y);
1200 /* Image sensors can report per-contact pressure */1200 /* Image sensors can report per-contact pressure */
1201 input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0);1201 input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0);
1202 input_mt_init_slots(dev, 3, INPUT_MT_POINTER | INPUT_MT_TRACK);1202 input_mt_init_slots(dev, 2, INPUT_MT_POINTER | INPUT_MT_TRACK);
1203 1203
1204 /* Image sensors can signal 4 and 5 finger clicks */1204 /* Image sensors can signal 4 and 5 finger clicks */
1205 __set_bit(BTN_TOOL_QUADTAP, dev->keybit);1205 __set_bit(BTN_TOOL_QUADTAP, dev->keybit);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t