summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-alps.c
AgeCommit message (Collapse)Author
2017-10-17HID: alps: add new U1 device IDMasaki Ota
Add new U1 device Product ID This device is used on HP Elite book x360 series. [jkosina@suse.cz: update changelog] Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-10-17HID: alps: add support for Alps T4 Touchpad deviceMasaki Ota
- Define T4 device specification value for support T4 device. - Creeate "t4_contact_data" and "t4_input_report" structure for decoding and storing T4-specific data - Create "t4_calc_check_sum()" function for calculating checksum value to send to the device. T4 needs to send this value when reading or writing device address value. - Create "t4_read_write_register()" function for reading and writing device address value. - Create "t4_raw_event()" function for decodin XYZ, palm and button data. - Replace "MAX_TOUCHES" fixed variable to "max_fingers" variable. - Add T4 devuce product ID. (0x120C) T4 device is used on HP EliteBook 1000 series and Zbook Stduio [jkosina@suse.cz: rewrite changelog] Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-10-17HID: alps: remove variables local to u1_init() from the device structMasaki Ota
Move dev_ctrl, dev_type, sen_line_num_x, sen_line_num_y, pitch_x, pitch_y, resolution, btn_info from u1_dev structure to "u1_init()", because these variables are only used in there. [jkosina@suse.cz: rewrite changelog] Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-10-17HID: alps: properly handle max_fingers and minimum on X and Y axisMasaki Ota
Create x_min, y_min and max_fingers variables for set correct XY minimum value and the number of max finger on each devices. [jkosina@suse.cz: update shortlog] Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-10-17HID: alps: Separate U1 device codeMasaki Ota
Create 'static int u1_init()' and factor out U1 device initialization code from main initialization and introduce per-device 'has_sp' flag. [jkosina@suse.cz: rewrite changelog] Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-10-17HID: alps: delete unnecessary struct u1_dev devInfoMasaki Ota
Delete "struct u1_dev devInfo" structure, because u1_dev structure is already declared as "struct u1_dev *data". [jkosina@suse.cz: rewrite changelog] Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-10-07Merge branches 'for-4.8/upstream-fixes', 'for-4.9/alps', ↵Jiri Kosina
'for-4.9/hid-input', 'for-4.9/intel-ish', 'for-4.9/kye-uclogic-waltop-fixes', 'for-4.9/logitech', 'for-4.9/sony', 'for-4.9/upstream' and 'for-4.9/wacom' into for-linus
2016-09-27HID: alps: fix multitouch cursor issueMasaki Ota
Issue reproduction procedure: 1. three or more fingers put on Touchpad. 2. release fingers from Touchpad. 3. move the cursor by one finger. 4. the cursor does not move. Cause: We do not notify multi fingers state correctly to input subsystem. For example, when three fingers release from Touchpad, fingers state is 3 -> 0. It needs to notify first, second and third finger's releasing state. Fix this by not breaking out on z axis and move x,y,z input handling code to the correct place so that it's in fact per-finger. [jkosina@suse.cz: reword changelog] Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-09-22HID: alps: fix error return code in alps_input_configured()Wei Yongjun
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. While at it, remove redundant input_free_device(NULL) call. [jkosina@suse.cz: ammend changelog] Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-09-22HID: alps: fix stick device not working after resumeKai-Heng Feng
The stick device does not work after resume, add U1_SP_ABS_MODE flag can make the device work after resume. This has been discovered by pure guesswork, based on how the existing code uses U1_TP_ABS_MODE flag on both initialization and resume. I also tested the the patch on an ALPS touchpad without stick device, did not notice any side effect on suspend/resume, so I made the U1_SP_ABS_MODE flag mandatory. [jkosina@suse.cz: made changelog more verbose] Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-09-19HID: alps: Fix memory leakAxel Lin
A kfree(readbuf) call was missed if hid_hw_raw_request() fails, fix it. Also avoid mixing direct return with goto in the error paths. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-06-23HID: alps: a few cleanupsMasaki Ota
Remove an unnecessary codes. Change input_ivent() function to appropriate function. Add the device ID of "HID_DEVICE_ID_ALPS_U1_DUAL". [jkosina@suse.cz: removed unnecessary bitshifts of values passed input_report_key() as spotted by Dmitry] Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-06-20HID: alps: pass correct sizes to hid_hw_raw_request()Jiri Kosina
Calculating size of the report as sizeof(pointer) always passess the length corresponding to the pointer type, not the underlying data report. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-06-17HID: alps: struct u1_dev *priv is internal to the driverJiri Kosina
... and therefore should be marked static. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-06-17HID: add Alps I2C HID Touchpad-Stick supportMasaki Ota
Add support Alps I2C HID Touchpad and Stick device. Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>