History log of /linux-master/drivers/input/mouse/cyapa_gen6.c
Revision Date Author Comments
# 1864a200 12-Dec-2023 ye xingchen <ye.xingchen@zte.com.cn>

Input: mouse - use sysfs_emit[_at]() instead of scnprintf()

Replace the calls to various *printf() functions with sysfs_emit() to
simplify the code.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202212021453578171100@zte.com.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 0efff5c0 21-Jun-2022 Jiang Jian <jiangjian@cdjrlc.com>

Input: cyapa_gen6 - aligned "*" each line

Consider * alignment in comments

Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
Link: https://lore.kernel.org/r/20220621070032.30072-1-jiangjian@cdjrlc.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# f051ae4f 14-Dec-2020 Arnd Bergmann <arnd@arndb.de>

Input: cyapa_gen6 - fix out-of-bounds stack access

gcc -Warray-bounds warns about a serious bug in
cyapa_pip_retrieve_data_structure:

drivers/input/mouse/cyapa_gen6.c: In function 'cyapa_pip_retrieve_data_structure.constprop':
include/linux/unaligned/access_ok.h:40:17: warning: array subscript -1 is outside array bounds of 'struct retrieve_data_struct_cmd[1]' [-Warray-bounds]
40 | *((__le16 *)p) = cpu_to_le16(val);
drivers/input/mouse/cyapa_gen6.c:569:13: note: while referencing 'cmd'
569 | } __packed cmd;
| ^~~

Apparently the '-2' was added to the pointer instead of the value,
writing garbage into the stack next to this variable.

Fixes: c2c06c41f700 ("Input: cyapa - add gen6 device module support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20201026161332.3708389-1-arnd@kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 6f49c4f5 07-Jul-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

Input: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200707180857.GA30600@embeddedor
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 17a4ed55 06-Aug-2018 Gustavo A. R. Silva <gustavo@embeddedor.com>

Input: mark expected switch fall-throughs

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>


# 3cd47869 04-Mar-2016 Dudley Du <dudl@cypress.com>

Input: cyapa - fix for losing events during device power transitions

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>


# a487c03f 12-Oct-2015 Dudley Du <dudl@cypress.com>

Input: cyapa - fix the copy paste error on electrodes_rx value

Fix the copy paste error on the electrodes_rx value set code which will
cause the electrodes_rx value be always set to the value of electrodes_y.

Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Dudley Du <dudl@cypress.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 757cae5a 20-Jul-2015 Dudley Du <dudl@cypress.com>

Input: cyapa - fully support runtime suspend power management

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>


# 945525ee 20-Jul-2015 Dudley Du <dudl@cypress.com>

Input: cyapa - add proximity support for gen5 and gen6 modules

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>


# c2c06c41 20-Jul-2015 Dudley Du <dudl@cypress.com>

Input: cyapa - add gen6 device module support

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>