aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/cyapa_gen5.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-08-08Input: mark expected switch fall-throughsGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 2 was used: -Wimplicit-fallthrough=2 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-04Input: cyapa - fix for losing events during device power transitionsDudley Du1-17/+82
When changing the scan rate as part of runtime-resume process we may lose some of the events, because: 1) for gen3 trackpads, the driver must msleep() some time to ensure that the device is ready to accept next command; 2) for gen5 and later trackpads, the queue dumping function will simply ignore the events when waiting for the set power mode command response. The solution is to keep polling and report those valid events when the set power mode command is in progress. Signed-off-by: Dudley Du <dudl@cypress.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-30Input: cyapa - do not try to enable proximity reporting on older devicesDudley Du1-4/+7
Avoid the driver generate warning message when the cyapa driver working with the old Gen5 trackpad device which does not support the proximity function. Those old Gen5 trackpad device all have the platform version less than 2. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: cyapa - fully support runtime suspend power managementDudley Du1-7/+14
Fix the the runtime suspend power management not working issue when system starts up and before user touches the trackpad device. TEST=test on Chromebook. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: cyapa - add proximity support for gen5 and gen6 modulesDudley Du1-1/+60
Gen5 and Gen6 trackpad devices are able to detect and report object proximity data/events, add this function support in the cyapa driver through the ABS_DISTANCE event. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: cyapa - add gen6 device module supportDudley Du1-3/+66
Based on the cyapa core, add support for basic functionality of the gen6 trackpad devices. The driver can automatically determine what protocol (gen3, gen5, or gen6) should be used with the attached trackpad device. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: cyapa - rename 'gen5' to 'pip' for chared codeDudley Du1-582/+521
Change 'gen5' to 'pip' for all macros, variables and functions that are shared between gen5 and gen6 modules to make naming more clear and readable. Also fix a few spelling errors. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-05-26Input: cyapa - fix a few typos in commentsShailendra Verma1-14/+9
Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-03-02Input: cyapa - remove superfluous type check in cyapa_gen5_read_idac_data()Geert Uytterhoeven1-1/+1
drivers/input/mouse/cyapa_gen5.c: In function ‘cyapa_gen5_read_idac_data’: drivers/input/mouse/cyapa_gen5.c:1876: warning: ‘max_element_cnt’ may be used uninitialized in this function drivers/input/mouse/cyapa_gen5.c:1873: warning: ‘offset’ may be used uninitialized in this function If *data_size is non-zero, and idac_data_type contains an unknown type, max_element_cnt and offset will be uninitialized, and the loop will process non-existing data. However, this cannot happen (for now), as there's a test for unknown types at the top of cyapa_gen5_read_idac_data(). As no "if ... else if ..." is used in other places, remove the superfluous "if" to silence the compiler warning. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-03-02Input: cyapa - fix unaligned functions redefinition errorDudley Du1-1/+1
Use asm/unaligned.h instead of linux/unaligned/access_ok.h header file to fix compiling issues such as following while doing cross platform compiling: "include/linux/unaligned/access_ok.h:7:19: error: redefinition of 'get_unaligned_le16' ... include/linux/unaligned/le_struct.h:6:19: note: previous definition of 'get_unaligned_le16' was here". Reported-by: kbuild test robot <kbuild-all@01.org> Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-22Input: cyapa - fix variable being dereferenced before checkDudley Du1-1/+3
Fixes the warning regarding variable being dereferenced before check 'gen5_pip->resp_len'. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-22Input: cyapa - fix endianness issues in gen5 firmware update supportDmitry Torokhov1-39/+40
gen5_bl_metadata_row_params structure has its fields specified with explicit endianness, so we should not be trying to convert to native CPU endianness when filling the structure. Also fix firmware validation checks and misspelled field in gen5_bl_metadata_row_params. Reported-by: kbuild test robot <fengguang.wu@intel.com> Reviewed-by: Dudley Du <dudl@cypress.com> Tested-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-18Input: cyapa - add gen5 trackpad force re-calibrate function supportDudley Du1-0/+65
Add force re-calibrate function support for gen5 trackpad device, it can be used through sysfs calibrate interface. Signed-off-by: Dudley Du <dudl@cypress.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-18Input: cyapa - add gen5 trackpad read baseline supportDudley Du1-0/+640
Add read baseline function support for gen5 trackpad device, it can be used through sysfs baseline interface. Signed-off-by: Dudley Du <dudl@cypress.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-18Input: cyapa - add gen5 trackpad firmware update supportDudley Du1-0/+391
Add firmware image update support for gen5 trackpad device, it can be used through sysfs update_fw interface. Signed-off-by: Dudley Du <dudl@cypress.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-18Input: cyapa - add gen5 trackpad device basic functions supportDudley Du1-0/+1678
This change adds support for Gen5 Cypress trackpads. The driver detects generation of the device at probe time and automatically selects appropriate protocol. Signed-off-by: Dudley Du <dudl@cypress.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>