History log of /linux-master/drivers/input/mouse/cyapa_gen3.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>


# d69f0a43 04-Oct-2020 Andrzej Pietrasiewicz <andrzej.p@collabora.com>

Input: use input_device_enabled()

Use the newly added helper in relevant input drivers.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Link: https://lore.kernel.org/r/20200608112211.12125-3-andrzej.p@collabora.com
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>


# 15ee2992 15-Oct-2018 Gustavo A. R. Silva <gustavo@embeddedor.com>

Input: cyapa - mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case, I replaced the "Fallthrough state"
commern with a proper "Fall through", which is what GCC is expecting to
find.

Addresses-Coverity-ID: 114758 ("Missing break in switch")
Addresses-Coverity-ID: 114759 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# da7bdec4 08-Jan-2018 Rasmus Villemoes <linux@rasmusvillemoes.dk>

Input: cyapa - remove duplicated macro definitions

Apart from whitespace differences, this block of macros is repeated
twice:

$ x=./drivers/input/mouse/cyapa_gen3.c; diff -w -u <(sed -n '139,181p' $x) <(sed -n '182,224p' $x)
$

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 13e360ac 15-Jan-2017 Nicholas Mc Guire <hofrat@osadl.org>

Input: cyapa - use msleep() for long delay

ulseep_range() uses hrtimers and provides no advantage over msleep()
for larger delays. Fix up the 50ms delays here to use msleep() and
reduce the load on the hrtimer subsystem.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# cd4c1b41 15-Jan-2017 Nicholas Mc Guire <hofrat@osadl.org>

Input: cyapa - use time based retry loop

Using counter based retry loops for peripherals results in the delay
being significantly overrun during high-load situations where delay
functions tend to be vary imprecise and overrun there timeouts. So
condition the termination on the actual condition of 2s for the
re-calibration to have been successful.

As this is a very long delay there is no advantage in using
high-resolution timers thus switching this to msleep().

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
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>


# 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>


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

Input: cyapa - rename 'gen5' to 'pip' for chared code

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>


# b53d7508 14-Apr-2015 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: cyapa - do not set otherwise unused variable

As the name suggests, always_unused argument in cyapa_gen3_set_power_mode()
is never used, so there is no reason for setting it to 0.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 17a28055 02-Mar-2015 Dudley Du <dudl@cypress.com>

Input: cyapa - fix unaligned functions redefinition error

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>


# e0f79cb7 17-Jan-2015 Dudley Du <dudl@cypress.com>

Input: cyapa - add gen3 trackpad force re-calibrate support

Add force re-calibrate function support for gen3 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>


# f50efd06 17-Jan-2015 Dudley Du <dudl@cypress.com>

Input: cyapa - add gen3 trackpad read baseline support

Add read baseline function supported for gen3 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>


# 87b26d72 17-Jan-2015 Dudley Du <dudl@cypress.com>

Input: cyapa - add gen3 trackpad device firmware update support

Add support for firmware image update for gen3 trackpad devices; the
firmware update is initiated by writing to update_fw sysfs attribute.

Signed-off-by: Dudley Du <dudl@cypress.com>
Tested-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 9f1cd857 17-Jan-2015 Dudley Du <dudl@cypress.com>

Input: cyapa - re-design driver to support multi-trackpad in one driver

In order to support multiple different chipsets and communication protocols
trackpad devices in one cyapa driver, the new cyapa driver is re-designed
with one cyapa driver core and multiple device specific functions component.
The cyapa driver core is contained in this patch, it supplies basic functions
that working with kernel and input subsystem, and also supplies the interfaces
that the specific devices' component can connect and work together with as
one driver.

Signed-off-by: Dudley Du <dudl@cypress.com>
Tested-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>