| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to make our printf more standard, utilize %ll for long long
arguments, rather than %l. This does cost a little bit in flash space
for that extra l in a couple of places, but enables us to turn on
compile-time printf format checking.
For this commit only, the semantics are such that both %l and %ll
take 64-bit arguments. In the next commit, %l goes to its correct
behavior of taking a sizeof(long) argument.
BUG=chromium:984041
TEST=make -j buildall
BRANCH=none
Cq-Depend:chrome-internal:1863686,chrome-internal:1860161,chrome-internal:1914029
Change-Id: I18081b55a8dbf5ef8ec15fc499ca75e59d31da58
Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1819652
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to make printf more standard, use %ph. Pass a pointer to
a struct describing the buffer, including its size. Add a convenience
macro so that conversion between the old style and new style is purely
mechanical. The old style of %h cannot be converted directly to %ph as-is
because the C standard doesn't allow flags, precision, or field width on
%p.
Ultimately the goal is to enable compile-time printf format checking.
This gets us one step closer to that.
BUG=chromium:984041
TEST=make -j buildall
BRANCH=None
Cq-Depend:chrome-internal:1559798,chrome-internal:1560598
Change-Id: I9c0ca124a048314c9b62d64bd55b36be55034e0e
Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1730605
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should ensure that all custom task definition are non-zero and fit
with the globally defined events. Add compile time check and change
semantics to specify bit number (instead of making all callers use the
BIT macro).
This also fixes an error with TASK_EVENT_PHY_TX_DONE for ITE being 0.
The bug that made that happen hasn't landed on any firmware branches
that use it though.
BRANCH=none
BUG=none
TEST=builds
Cq-Depend:chrome-internal:1178968,chrome-internal:1178952
Change-Id: I5e1d1312382d200280c548e9128e53f4eddd3e61
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1570607
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mechanical replacement of bit operation where operand is a constant.
More bit operation exist, but prone to errors.
Reveal a bug in npcx:
chip/npcx/system-npcx7.c:114:54: error: conversion from 'long unsigned int' to 'uint8_t' {aka 'volatile unsigned char'} changes value from '16777215' to '255' [-Werror=overflow]
BUG=None
BRANCH=None
TEST=None
Change-Id: I006614026143fa180702ac0d1cc2ceb1b3c6eeb0
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1518660
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Requested for linux integration, use BIT instead of 1 <<
First step replace bit operation with operand containing only digits.
Fix an error in motion_lid try to set bit 31 of a signed integer.
BUG=None
BRANCH=None
TEST=compile
Change-Id: Ie843611f2f68e241f0f40d4067f7ade726951d29
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1518659
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we receive a beacon, we will also try to collect finger events.
In this case, there might be the case that there is not finger but dome
switch is on. In this case, we should not report the click.
BRANCH=nocturne
BUG=b:119597909
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I03fe4481d17f6e919ab9501b2a93fa19635e381f
Reviewed-on: https://chromium-review.googlesource.com/1337253
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=nocturne
BUG=b:118444760
TEST=local build and run on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I3799c9fd5e8e302c7cca35a5aca0b6bbc3879218
Reviewed-on: https://chromium-review.googlesource.com/1326781
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, beacon count is logged every second. Suppress the log and
only print errors when beacon count is frozen.
BRANCH=nocturne
BUG=None
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I20eb992b5f006f425bb5a94bad8e0e5b3015a7ac
Reviewed-on: https://chromium-review.googlesource.com/1322187
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=nocturne
BUG=b:118444760
TEST=local build and run on device
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: Ie71d6e94009046f2a097b9a8ab0820959b35d610
Reviewed-on: https://chromium-review.googlesource.com/1322186
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Workaround for the bug described in b/118312397. Without this,
EC FW is not able to request Full Panel Initialization (FPI), in
some specific cases, if the last FPI on ST FW 32 previously failed.
BUG=b:118312397
TEST=
1. Flash whiskers_v2.2.75-3a719f70b.fw (32.0)
2. During FPI, disconnect the base
3. Flash whiskers_v2.2.88-6c5576913.fw (34.0)
4. EC FW is unable to run FPI
This FW fixes the issue in 4, and FPI is run on boot, when the
EC FW realizes that Cx table is invalid.
BRANCH=whiskers
Change-Id: Ifb817d2c7d4a9311f3273b46964903b0f94dcdae
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1297092
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During touchpad init process, TP might generate errors related to
invalid CX config or invalid panel config. We try to catch these errors
and take required actions.
BRANCH=nocturne
BUG=b:117203130
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I405fdbcd7a3077fc8b237c8fff02fca7005c2195
Reviewed-on: https://chromium-review.googlesource.com/1270416
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
st_tp_read_all_events() will always return "number of events available
in rx_buf.events[]". If there are any error, recommended action will be
stored in "tp_control".
BRANCH=nocturne
BUG=b:117203130
TEST=manual on device
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I021b0b1baf19bee8ebe0f60dd264f3a52a656532
Reviewed-on: https://chromium-review.googlesource.com/1270401
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We accidentially override panel config section, and this makes us have
to do "panel initialization" everytime after tp firmware is updated.
BRANCH=nocturne
BUG=b:117203130
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I10ce62297403f3e1dcadae62573255b00f82247d
Reviewed-on: https://chromium-review.googlesource.com/1270415
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To make it easier to decide if full panel initialization is required,
we put the original FTB header in the beginning of unpacked TP FW.
touchpad_update_write will clear CX data if CX version will be
different.
CQ-DEPEND=CL:*697971
BRANCH=nocturne
BUG=b:117203130
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I60351783b8c015fcb23431811c156bfca8d15b67
Reviewed-on: https://chromium-review.googlesource.com/1267876
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we recover from touchpad error by resetting the touchpad, after TP
reset, "touch_slot" should be reset to 0.
BRANCH=nocturne
BUG=b:117568885
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I4dad1b2ad28885e376023d5e5274485aaa852ac3
Reviewed-on: https://chromium-review.googlesource.com/1274685
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in dump_memory, rx_len includes DUMMY_BYTE, but it should not be counted
when we are printing.
BRANCH=nocturne
BUG=b:117398324
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I9810e97b1fb0ce94973fc24963d6c6ea601759be
Reviewed-on: https://chromium-review.googlesource.com/1267875
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=nocturne
BUG=b:117203130
TEST=on whiskers: downgrade to v18, upgrade to v25, full init is
triggered
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I74582aba181dab31eede1193b400abfc847c1151
Reviewed-on: https://chromium-review.googlesource.com/1258373
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After ST firmware update, there are two ways of initialization:
1. Panel initialization
2. Full panel initialization
Full panel initialization is only required if CX table format is
changed. In the future, we will track versions of CX table format, and
only request full initialization if required.
BRANCH=nocturne
BUG=b:117203130
TEST=on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I05dc2203213606addb27fd03f1c9ff937e4941f0
Reviewed-on: https://chromium-review.googlesource.com/1258691
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the entire process would take up to 2 seconds.
CQ-DEPEND=CL:1264236
BRANCH=nocturne
BUG=b:117203130
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I0cdcdb8caf3b1d9cf6a5787b93bf8cdb13832a74
Reviewed-on: https://chromium-review.googlesource.com/1264237
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=nocturne
BUG=None
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I6d336d6a35671b59e0821ecd38bd481b7c4e80e0
Reviewed-on: https://chromium-review.googlesource.com/1258692
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When idle count does not change, reset the touchpad if there are no
fingers on touchpad.
BRANCH=nocturne
BUG=b:113315759
TEST=tested on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I8336bac2b31963e4c2cb671ced8502e6b176424d
Reviewed-on: https://chromium-review.googlesource.com/1261615
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Beacon and error events are still available in heatmap mode.
BRANCH=nocturne
BUG=None
TEST=manual on device
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I6ac2e20f62bedf7084edb567765fd5b5fe7ae800
Reviewed-on: https://chromium-review.googlesource.com/1258689
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=nocturne
BUG=None
TEST=manual on device
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I141c73e4c9736332b05bd1713dd40111148c6b66
Reviewed-on: https://chromium-review.googlesource.com/1256307
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pressure, major, minor values are adjusted in v25.0 firmware.
This should reduce the chance of dropping a tap.
BRANCH=nocturne
BUG=b:116321493
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: Ia9345f7a624e7db9b73926ee29e5e5631d63998a
Reviewed-on: https://chromium-review.googlesource.com/1256306
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
0xf1, 0xf2, 0xf3 are introduced since version 25.0. The suggested
action is touchpad reset.
BRANCH=nocturne
BUG=b:113315759
TEST=manual on device
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I92842e28d6dc28fc1141e6232143f26f652971ac
Reviewed-on: https://chromium-review.googlesource.com/1256305
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The touchpad firmware will send out a beacon every second. Therefore, if
there is no events (touch event / error event / beacon event) for more
than 3 seconds, we should assume that touchpad hangs, and we should
reset the touchpad.
This requires touchpad FW >= v25.0.
BRANCH=nocturne
BUG=b:113315759
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I6dc57705ebb8ef9f9d0ffde3c3243704b7ff88ee
Reviewed-on: https://chromium-review.googlesource.com/1238753
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=nocturne
BUG=b:113315759
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: Ie1547d5cadcb6876b6e6ea25504aabd84d21b0c9
Reviewed-on: https://chromium-review.googlesource.com/1256304
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When finger is leaving, the confidence should be '1', since it is
not a plam.
Some background:
Since CL:617811, Linux kernel treats a finger whose confidence equal
to 0 as a "palm", and override its width and height with max value.
Therefore, when we are reporting a finger leaving event, if the
confidence is 0, the finger will quickly become a fat finger (max
width and heigh, locates at top-left corner), and then leave. This
will confuse gesture library, and might cause unintended behaviors.
BRANCH=nocturne
BUG=b:116321493
TEST=manually on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I30be0e5efeb6c2215795565dce8c2da23892939f
Reviewed-on: https://chromium-review.googlesource.com/1250584
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Tai-Hsu Lin <sheckylin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, there was a static variable "enabled" in
touchpad_power_control(). Logically, this value should be same as
"SYSTEM_STATE_ACTIVE_MODE" in system_state. And, because system_state
will be reset after touchpad reset, to make sure everything line up, we
should get "enabled" from system_state instead.
Also, when touchpad is being reset due to errors, power control should
not enable / disable scanning.
BRANCH=nocturne
BUG=None
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I5485422759c68769e9ad249a2903f3f796b5b068
Reviewed-on: https://chromium-review.googlesource.com/1242576
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We forgot to add dummy byte while dumping memory. Also make sure all
other spi_transaction calls take dummy byte into account.
BRANCH=nocturne
BUG=b:112877237
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I5366e16103a0b1ba502dd34ba4c3536482b99776
Reviewed-on: https://chromium-review.googlesource.com/1242575
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Width and Height are 12 bits in USB HID descriptor. But the logical
maximum was set to 255.
Also scale up width and height reported by ST firmware.
BRANCH=nocturne
BUG=none
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I899af2b18120d9e877d45e1dc2c14404a412797b
Reviewed-on: https://chromium-review.googlesource.com/1232798
Reviewed-by: Tai-Hsu Lin <sheckylin@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When ST touchpad is down, or the SPI interface is not working properly
(either hardware or software issue), we might receive events filled with
0xff. In this case, try if resetting touchpad can bring it back. To
prevent infinite reboot, if the touchpad is not recovered after 3
reboots, stop it.
BRANCH=nocturne
BUG=None
TEST=manual on device
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I8d2a8f0f4aa305af11f14a63f0bc4d53c2c23a49
Reviewed-on: https://chromium-review.googlesource.com/1230393
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, dump_memory can only be enabled at compile time (through
local build). Make this runtime configurable.
Currently, it is default off, since dump_memory is very slow and might
not be useful to enable for all users. The dump log through USB
interface doesn't look good for now. We revisit the default value in
the future.
BRANCH=nocturne
BUG=b:112877237
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I422a5a23392298301995df4fbf8101b7a18a62ba
Reviewed-on: https://chromium-review.googlesource.com/1212665
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For errors that are noted as "FW shall halt" in spec, we should reset
the touchpad, so it won't keep generating the same error and cause EC
watchdog reboot the entire system.
BRANCH=nocturne
BUG=b:112877237
TEST=tested on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: Ie3c0a9930628caf1e55a243bd017f233756152a6
Reviewed-on: https://chromium-review.googlesource.com/1203351
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following new commands are added to help debugging touchpad issues.
+ST_TP_DEBUG_CMD_RESET_TOUCHPAD 0x00
ST_TP_DEBUG_CMD_CALIBRATE 0x01
+ST_TP_DEBUG_CMD_START_SCAN 0x02
+ST_TP_DEBUG_CMD_STOP_SCAN 0x03
+ST_TP_DEBUG_CMD_READ_BUF_HEADER 0x04
+ST_TP_DEBUG_CMD_READ_EVENTS 0x05
BRANCH=none
BUG=b:70482333
TEST=manual on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: Id9a604560afda9304329d5ca7c21160df225bf15
Reviewed-on: https://chromium-review.googlesource.com/1184135
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When in tablet mode, disable keyboard scanning and touchpad.
Refactor touchpad_*.c power management to take both into account
(there is some duplicated code here, that we may want to merge
in the future).
This will also prevent magic keyboard from working, but we are
ok with this, at least for now.
BRANCH=none
BUG=b:73133611
TEST=In tablet mode, keyboard scanning and touchpad are both disabled.
Change-Id: I51b7c50b90cca9b9f574c5c611daa89fe8a480bb
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1180639
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should only fail if host is trying to enable heatmap via
`Set_Interface` command. Setting altsetting to 0 (disable
heatmap) should always success.
BRANCH=none
BUG=b:113141452
TEST=tested on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I540ce7af46bd2bf84dccb0d21bf0ad89ade3c9e9
Reviewed-on: https://chromium-review.googlesource.com/1198943
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
TEST=make buildall -j
TEST=test on whiskers
BUG=b:70482333
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: Ieadb743b428997ca1e7c9d45837f503d3023f779
Reviewed-on: https://chromium-review.googlesource.com/1198942
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`confidence` is expected from a PTP-compliant touchpad
BRANCH=none
BUG=b:70482333
TEST=manual
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: Ibe7166f43cae5fb36bbcc4e6dfd9ae6525a7225e
Reviewed-on: https://chromium-review.googlesource.com/1188170
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In latest ST firmware, domeswitch level is already reported, there is no
domeswitch_chg anymore.
BRANCH=none
BUG=b:70482333
TEST=manual on device
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I6ce21f48ec8aa62a4167a86581acd2e2abee7ce6
Reviewed-on: https://chromium-review.googlesource.com/1177524
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rx_buf was set incorrectly in heat map mode.
Also add debug messages to help debugging.
BRANCH=none
BUG=b:70482333
TEST=test on full system, enable heatmap
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I325a9b7983a16634b95eecdc592c59222e48c7aa
Reviewed-on: https://chromium-review.googlesource.com/1177093
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:70482333
TEST=test on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: If6660977ed598c8ed81eba98e7f1805dd8bb7976
Reviewed-on: https://chromium-review.googlesource.com/1163237
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:70482333
TEST=test on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I84b481b3d2dee9254cdf798aee01a3a4ce44ac88
Reviewed-on: https://chromium-review.googlesource.com/1160427
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The latest release from ST is changed to 1 byte per pixel in heat map
mode.
BRANCH=none
BUG=b:70482333
TEST=test on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I499bbea2636a65b06dacd81b358a7444bd8ac6c2
Reviewed-on: https://chromium-review.googlesource.com/1160426
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Maximum pressure is now defined by
CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Z.
`hammer` is the only board using usb_hid_touchpad, the board.h is
updated to reflect the change (for old boards "HAMMER" and "STAFF", we
keep the value 1023, so they should behave the same).
BRANCH=none
BUG=b:70482333
TEST=make BOARD=whiskers
TEST=make buildall -j
TEST=manually on device
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I70b0a5b19dfbe3ac731ef2ead08578a7f7a1cb0b
Reviewed-on: https://chromium-review.googlesource.com/1141676
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:70482333
TEST=`make BOARD=whiskers` works w/ & w/o CONFIG_USB_ISOCHRONOUS
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: Ia05e778d9795a09ea6edceddd839992859d75050
Reviewed-on: https://chromium-review.googlesource.com/958897
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. In usb_hid_touchpad.h, `pressure` is defined as unsigned:10, while in
touchpad_st.h, `z` is defined as unsigned:8, scale it up to match
size of `pressure`.
3. Scale up `width` and `height` for similar reason.
2. Update physical dimension, so it match the real device.
With this change, I can use EC touchpad on my Linux machine.
BRANCH=none
BUG=b:70482333
TEST=tested on Linux
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I651f2345ea48c7c9ed495e9684b762bde167092e
Reviewed-on: https://chromium-review.googlesource.com/1125652
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When USB is suspended and disable remote wakeup (SUS0), we can stop
touchpad scanning to save some power.
This CL also stops sending empty touchpad HID events when there is no
finger events nor button events.
BRANCH=whiskers
BUG=b:70482333
TEST=`st_tp_stop_scan` is called on USB suspend
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: Iebf29d7371383b7493baa1059cfa8d56bbc2589c
Reviewed-on: https://chromium-review.googlesource.com/1095119
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Full panel initialization can take about 1.6 seconds. If this is
called by hook_call_deferred, it will block other HOOKS. Replace the
'while loop + sleep' by re-calling deferred every 100ms.
BRANCH=whiskers
BUG=b:109714732
TEST=sudo ./extra/usb_updater/usb_updater2 -d 18d1:5030 --tp_update <fw>
TEST=sudo extra/usb_updater/usb_updater2 -d 18d1:5030 --tp_debug=01
TEST=(EC console) touchpad_st calibrate
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I665169524a06a7c359303a4a3dceced4a141f9ae
Reviewed-on: https://chromium-review.googlesource.com/1086895
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In st_tp_reset, we should exit the function when we received a
controller ready event. The "break" statement only breaks inner for
loop, not while loop. Fix this bug.
BRANCH=whiskers
BUG=b:70482333
TEST=sudo ./extra/usb_updater/usb_updater2 -d 18d1:5030 --tp_update <fw>
TEST=sudo extra/usb_updater/usb_updater2 -d 18d1:5030 --tp_debug=01
TEST=(EC console) touchpad_st calibrate
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: I92f94cce33c32ab26924fb91b50cd192d179ba90
Reviewed-on: https://chromium-review.googlesource.com/1086894
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|