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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Tested-by: Jeremiah Mahler <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Acked-by: Dudley Du <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dudley Du <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Fixes the warning regarding variable being dereferenced before check
'gen5_pip->resp_len'.
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Dudley Du <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Reviewed-by: Dudley Du <[email protected]>
Tested-by: Dudley Du <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Add force re-calibrate function support for gen5 trackpad device, it can be
used through sysfs calibrate interface.
Signed-off-by: Dudley Du <[email protected]>
Tested-by: Jeremiah Mahler <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Add read baseline function support for gen5 trackpad device, it can be used
through sysfs baseline interface.
Signed-off-by: Dudley Du <[email protected]>
Tested-by: Jeremiah Mahler <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Add firmware image update support for gen5 trackpad device, it can be used
through sysfs update_fw interface.
Signed-off-by: Dudley Du <[email protected]>
Tested-by: Jeremiah Mahler <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Tested-by: Jeremiah Mahler <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>