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
771771 */
772772 static void elan_report_contact(struct elan_tp_data *data,
773773 int contact_num, bool contact_valid,
774− bool hover_event, u8 *finger_data)
774+ u8 *finger_data)
775775 {
776776 struct input_dev *input = data->input;
777777 unsigned int pos_x, pos_y;
@@ -815,9 +815,7 @@ static void elan_report_contact(struct elan_tp_data *data, · 37 unmodified lines
815815 input_mt_report_slot_state(input, MT_TOOL_FINGER, true);
816816 input_report_abs(input, ABS_MT_POSITION_X, pos_x);
817817 input_report_abs(input, ABS_MT_POSITION_Y, data->max_y - pos_y);
818− input_report_abs(input, ABS_MT_DISTANCE, hover_event);
819− input_report_abs(input, ABS_MT_PRESSURE,
820− hover_event ? 0 : scaled_pressure);
818+ input_report_abs(input, ABS_MT_PRESSURE, scaled_pressure);
821819 input_report_abs(input, ABS_TOOL_WIDTH, mk_x);
822820 input_report_abs(input, ABS_MT_TOUCH_MAJOR, major);
823821 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
839837 hover_event = hover_info & 0x40;
840838 for (i = 0; i < ETP_MAX_FINGERS; i++) {
841839 contact_valid = tp_info & (1U << (3 + i));
842− elan_report_contact(data, i, contact_valid, hover_event,
843− finger_data);
840+ elan_report_contact(data, i, contact_valid, finger_data);
844841
845842 if (contact_valid)
846843 finger_data += ETP_FINGER_DATA_LEN;
847844 }
848845
849846 input_report_key(input, BTN_LEFT, tp_info & 0x01);
847+ input_report_abs(input, ABS_DISTANCE, hover_event != 0);
850848 input_mt_report_pointer_emulation(input, true);
851849 input_sync(input);
852850 }
@@ -922,6 +920,7 @@ static int elan_setup_input_device(struct elan_tp_data *data) · 69 unmodified lines
922920 input_abs_set_res(input, ABS_Y, data->y_res);
923921 input_set_abs_params(input, ABS_PRESSURE, 0, ETP_MAX_PRESSURE, 0, 0);
924922 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);
925924
926925 /* And MT parameters */
927926 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
934933 ETP_FINGER_WIDTH * max_width, 0, 0);
935934 input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0,
936935 ETP_FINGER_WIDTH * min_width, 0, 0);
937− input_set_abs_params(input, ABS_MT_DISTANCE, 0, 1, 0, 0);
938936
939937 data->input = input;
940938
drivers/input/mouse/synaptics.c+1−1
@@ -1199,7 +1199,7 @@ static void set_input_params(struct psmouse *psmouse, · 1198 unmodified lines
11991199 ABS_MT_POSITION_Y);
12001200 /* Image sensors can report per-contact pressure */
12011201 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);
12031203
12041204 /* Image sensors can signal 4 and 5 finger clicks */
12051205 __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