| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the interest of making long-term branch maintenance incur as little
technical debt on us as possible, we should not maintain any files on
the branch we are not actually using.
This has the added effect of making it extremely clear when merging CLs
from the main branch when changes have the possibility to affect us.
The follow-on CL adds a convenience script to actually pull updates from
the main branch and generate a CL for the update.
BUG=b:204206272
BRANCH=ish
TEST=make BOARD=arcada_ish && make BOARD=drallion_ish
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a followup to CL:3104290, give the TCPCI TRANSMIT and
RX_BUF_FRAME_TYPE types more consistent names. Most of them can be used
for receiving, not just transmitting. Fix lint errors thus revealed.
BUG=b:155476419
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I399ec479eacc18622fc4d3f55f8bdabf4560fcff
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3125995
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert usages of this enum to tcpm_sop_type.
BUG=b:155476419
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I5fed273d72e7ad0e191db0cb0d121b70bdd9ecdb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104291
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename tcpm_transmit_type to tcpm_sop_type to reflect that it can be
used for Rx as well. Describe it in comments. This prepares to
consolidate enum pd_msg_type into this enum.
BUG=b:155476419
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Ife97d4ad51c48f2e832b94e007954919e236a309
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104290
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SenderResponseTimer shall be used by the sender's policy engine to
ensure that a message requesting a response is responded to within a
bounded time. Which is 24Msec to 30 Msec. However, delays associated
TCPC I2C, PE, and PRL layers make hard reset response time greater 30Msec.
This CL address the delay associated with TCPC. When TCPC transmit
success is reported by TCPC upon receiving the GoodCRC, time stamp is
recorded. Another time stamp is recorded just before starting
SenderResponseTimer and offsetting PD_T_SENDER_RESPONSE.
BUG=b:182439366
BRANCH=none
TEST=checked with GRL compliance tester. Noted that total response time
is in the middle of the expected time of 24ms to 30ms. This fix achieved
response time about 27.675ms
Signed-off-by: udaykiran <udaykiran@google.com>
Change-Id: Id2ddcdd90eed8b3d66ade3d16877004871a21de8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2971078
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit ac08c9d1dbc9f587df3ee6b15d58c0203f7e356e.
Reason for revert: Breaks public build
Original change's description:
> fpsensor: Support building firmware that works for both sensors
>
> This is a refactoring to allow building FPMCU firmware that works for
> one FPC sensor and one ELAN sensor.
>
> 1. When both drivers implement our common functions, e.g. fp_sensor_init(),
> rename them to fp_sensor_init_fpc() and fp_sensor_init_elan().
> 2. There are a few functions implemented not in FPC driver but in FPC
> private library, e.g. fp_sensor_finger_status(). I kept this as-is for
> FPC but renamed the one in ELAN driver to fp_sensor_finger_status_elan()
> 3. If building for ELAN, need to hardcode elan=1 in hatch_fp/board.c
> because the sensor type GPIO always says FPC.
>
> BRANCH=none
> BUG=b:175158241
> TEST=make run-fpsensor; make run-fpsensor_status;
> make run-fpsensor_crypto
> TEST=make -j BOARD=dartmonkey
> TEST=add CONFIG_FP_SENSOR_ELAN515 to board/hatch_fp/board.h;
> make -j BOARD=bloonchipper
> Firmware binary fully works on Dragonair (FPC) and Voema (ELAN)
> TEST=run device tests with http://crrev/c/2750547 and
> http://crrev/i/3654297 on Dragonclaw, all pass
>
> Change-Id: I789090dbdfe35ac6aefd6a629fa4c7bde89dc437
> Signed-off-by: Yicheng Li <yichengli@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727971
> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
> Commit-Queue: Tom Hughes <tomhughes@chromium.org>
Bug: b:175158241, b:184616069
Change-Id: I2a02a6eefc316e7e13aa188f1ae16672dce2babd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2809521
Auto-Submit: Tom Hughes <tomhughes@chromium.org>
Tested-by: Tom Hughes <tomhughes@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: caveh jalali <caveh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a refactoring to allow building FPMCU firmware that works for
one FPC sensor and one ELAN sensor.
1. When both drivers implement our common functions, e.g. fp_sensor_init(),
rename them to fp_sensor_init_fpc() and fp_sensor_init_elan().
2. There are a few functions implemented not in FPC driver but in FPC
private library, e.g. fp_sensor_finger_status(). I kept this as-is for
FPC but renamed the one in ELAN driver to fp_sensor_finger_status_elan()
3. If building for ELAN, need to hardcode elan=1 in hatch_fp/board.c
because the sensor type GPIO always says FPC.
BRANCH=none
BUG=b:175158241
TEST=make run-fpsensor; make run-fpsensor_status;
make run-fpsensor_crypto
TEST=make -j BOARD=dartmonkey
TEST=add CONFIG_FP_SENSOR_ELAN515 to board/hatch_fp/board.h;
make -j BOARD=bloonchipper
Firmware binary fully works on Dragonair (FPC) and Voema (ELAN)
TEST=run device tests with http://crrev/c/2750547 and
http://crrev/i/3654297 on Dragonclaw, all pass
Change-Id: I789090dbdfe35ac6aefd6a629fa4c7bde89dc437
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727971
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:177908650
TEST=Flash icetower v0.2, observed FP_SPI_SEL on console
TEST=Flash nocturne, observed FP_SPI_SEL on console
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I2b221139fed817de4c58db3b6c8198942ab86e7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2648731
Reviewed-by: Craig Hesling <hesling@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow tests to use a mock charge_manager. Do not build the real charge
manager when this is used.
BUG=b:173023378,b:169385081,b:172709198,b:173028832,b:173028791
BUG=b:173141941,b:173142113
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I49caccafd024515833880d7251092b77623d4a71
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2639584
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=make buildall
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Iaa6888d2e0d861d64b2747856465789304dde414
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613724
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=make buildall
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Iafbb0dd23a72ef32a1b3100fdfdeaf57c58b51f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613249
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=make buildall
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I0b498d56dd189e3360fd1498acbfb5314c9870d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2602844
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This header file is used from quite a few files, relying on the EC
build system to find includes in the driver/tcpm directory. For Zephyr
we don't want to add that as an include.
It makes more sense for header files to be in an include directory, so
move it and fix up the users.
BUG=b:175434113
BRANCH=none
TEST=build Zephyr and ECOS on volteer
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I5851914b1a7d3fdc1ba911c0fbe9046afbaf6f5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597985
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove test/usb_tcpmv2_tcpci.c to avoid duplication with
test/usb_tcpmv2_compliance.c
BUG=none
BRANCH=none
TEST=make run-usb_tcpmv2_compliance
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: Ie62d0f7e2cc30c3086e03103a43dede5515006b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597598
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Be explicit about checking all transmitted messages to avoid
getting out of sync.
Fix retries check in TD.PD.LL.E3, retries are handled by TCPC.
BUG=b:175144677
BRANCH=none
TEST=make run-usb_tcpmv2_compliance
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: I017244c669e0c50e49b8974a7462007625c354ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597597
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:175144677
BRANCH=none
TEST=make run-usb_tcpmv2_compliance
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I629e2811b2cba5aa9821d8c855e039a6cfaa32ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2595816
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Place mock functions in the mock libraries corresponding to the layers
of the real implementations. Broadly, move towards one layer of the TCPM
stack as a UUT, with mocks for the other layers as needed. There should
be a one-to-one correspondence between real modules and mock modules.
usb_pd_mock.c does not correspond to any real implementation module or
TCPM stack layer, so remove it and move its contents to the layers
corresponding to their real implementations.
Also clean up some redundant or misplaced mocks inside tests.
BUG=b:153071799,b:173791979
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Ic44df8675de2b9f1f8c7669cd97dcdc296bf107f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2578200
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Better mock tx and rx messages, add sop type.
BUG=b:161835483 b:173791979
BRANCH=none
TEST=make run-usb_pe_drp
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: If1f91b6385d6841d662a8a6262af6382645da92e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2553343
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove redundant checks for VCONN Source in pe_attempt_port_discovery
(which prevent discovery from running). Allow pe_vdm_send_request to
attempt to become VCONN Source if necessary. Make the checks in the VDM
request child states more complete (not just checking for VCONN Source).
BUG=b:170662791
TEST=Attach Tapex Creek board; observed successful discovery
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Id7d3a1b82d1029f69b3e05b845632e7237524bc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2486303
Tested-by: Li1 Feng <li1.feng@intel.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As requested in CL:2321869 review, make a new version of
test_send_caps_error that uses the external interface of the PE
layer.
BUG=b:161835483
BRANCH=none
TEST=make run-usb_pe_drp
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: I983b145cd1e731e844363955896898a2374a0a30
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2419834
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new unit test for usb_pe_drp with mocks for the various
subsystems that it will use.
The fake_prl module is already essentially a mock for the PRL layer,
so just move it into the mocks directory and make it available as
mock to other tests.
BUG=b:163421994
BRANCH=None
TEST=`make runhosttests` succeeds
Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
Change-Id: I2aea3fa0694e8d9e6bae1f47516cb4d5d2a1e714
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364050
Tested-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:76037094
TEST=make buildall -j
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ibe8649c3cf77ef4542b5fc46d7df5eee03293b56
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364755
Commit-Queue: Craig Hesling <hesling@chromium.org>
Reviewed-by: Craig Hesling <hesling@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to ensure that the previous Rd or Rp has been held long enough
before we transition into hardware auto toggle otherwise the first
toggle might be too short and violate the DRP timing spec
BRANCH=none
BUG=b:163095971
TEST=Verify on scope
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I92e9f5ca7dbca2b347e438d774551cc11476195b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2343176
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add test for TD.PD.SRC3.E26.Soft_Reset sent regardless of Rp value.
BUG=b:161835483
BRANCH=none
TEST=make -j run-usb_tcpmv2_tcpci
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: I972bffcb1c7a330aef4ebdff98fcd33af9a667be
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2340486
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are retrying in both the TCPC hardware (4 total) and
in the Protocol layer (3 total) when we do not get a GoodCRC back from
the port partner. We are only suppose to retry up to nRetryCount times
which is 2. This means we should be sending 3 total replies.
Also correct a misinterpretation of the spec around SOP' and SOP"
retries. We were not retrying those packets, but we should be retry them
as the SOP. The SOP' device will not retry, but we (as the SOP) should
retry packet that we are sending to them.
The TCPM is not fast enough to meet the timing for tRetry (195 usec), so
we need to perform the retries in the TCPC hardware layer.
BRANCH=none
BUG=b:150617035
TEST=Verify passing compliance test with GRL-C2 on Trembyle
Change-Id: I55c4ab2f5ce8f64acf21af943862d96d9088622d
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2248960
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:162369240
BRANCH=none
TEST=make -j run-usb_tcpmv2_tcpci
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: I61a9f99a10c3432135a91699ac04ff65690388e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2335455
Commit-Queue: Jett Rink <jettrink@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add unit tests for the packet discard logic for packets while going
into SinkTxNG.
BUG=b:160622527, b:161174072
BRANCH=None
TEST=`TEST_LIST_HOST=usb_prl make runhosttests`
Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org>
Change-Id: Ied7689d2fe40da93069e58b53ea32e053ab887b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2300690
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new test that runs a full set of TCPMv2 layers and state
machines, talking to a simulated TCPC via I2C.
Initial test cases:
1) Plug in a non-PD power supply -> we connect as sink.
2) AP S5 > S3 > S0 -> auto-toggle + low power.
BUG=b:161167893
BRANCH=none
TEST=make -j run-usb_tcpmv2_tcpci
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: If8b8eb2cca722ed01cbe1d6000fb3e4f4b70149c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2283911
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit creates a reporting function for the PRL to let the PE know
when messages have been discarded.
States will have to handle message discard internally since the response
depends on the portion of the AMS sequence they're in. For some states
which begin AMSes, a new shared parent has been added which runs the
sender response timer and checks discard for the child.
More states (and discard mid-AMS) are expected to be added in future
CLs.
The new parent state saves an average of 124 bytes of flash space.
BRANCH=None
BUG=b:158248741,b:157228506
TEST=on waddledoo, Dell dock no longer soft resets during power role
swap
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I61b3e96e1d14634dcd5edda4e133968ace769b21
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2241577
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that the old usb_prl unit test is under usb_prl_old, add a new
unit test for usb_prl with mocks for the various subsystems that it
will use.
BUG=b:158608129
BRANCH=None
TEST=`TEST_LIST_HOST="usb_prl_old usb_prl" make runhosttests`
Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
Change-Id: Ie1bf9a4494cd933473caa4ceb594eddd97c277c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2252662
Tested-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also update prints functionality to make tests easier
to see what is happening
BRANCH=none
BUG=b:153071799
TEST=use mock in child CL
Change-Id: Ia9cfeeff220e3255e6fc0aa41f0795df3b1920e4
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2131049
Commit-Queue: LaMont Jones <lamontjones@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using separate test binaries helps to prevent state from one set of
tests accidentally leaking into other tests. Ideally all unit tests
should be completely independent. Since there's a lot of global state in
the fpsensor code the separate test binaries should help prevent the
state from leaking across tests as we continue to add more.
Also, by having a 1:1 correspondence between test binaries and test
files, it's clearer what file (and functionality) each set of tests is
targeting.
BRANCH=none
BUG=none
TEST=make buildall -j
Change-Id: I937a5ffebfe61aa711efbbc2467d15d514fcfbae
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1832748
Commit-Queue: Yicheng Li <yichengli@chromium.org>
Tested-by: Yicheng Li <yichengli@chromium.org>
Reviewed-by: Yicheng Li <yichengli@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move header files for mocks into the include/mocks folder. These header
files aren't just private to the common/mock implementation as the test/
files also need access to these defines.
BRANCH=none
BUG=none
TEST=buildall
Change-Id: I25d03d194ab46b7665f54175979577aa90af814f
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2039038
Commit-Queue: Craig Hesling <hesling@chromium.org>
Reviewed-by: Craig Hesling <hesling@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bloonchipper (aka hatch_fp aka dragonclaw) has a voltage divider that
can be used to select the sensor and the transport type.
Supported designs:
* Dragonclaw rev 0.2 (green with Google logo):
go/dragonclaw-schematic-rev-0.2
* Hatch reference v3.0:
go/hatch-schematic-rev-3.0
The selection lines are connected to ADC inputs, so a future change will
use the ADC to allow more than two transports or sensors.
BRANCH=none
BUG=b:147113851
TEST=flash dragonclaw rev 0.2 and view console output
Change-Id: If2e4b150d34cfe41477be528c70e1645043d4d82
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986322
Reviewed-by: Craig Hesling <hesling@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ensures that these initializer/reset macros
can be used as a reset value (after initialization).
BRANCH=nocturne,nami
BUG=none
TEST=make buildall -j
Signed-off-by: Craig Hesling <hesling@chromium.org>
Change-Id: I5f4675399c87d959235b09e04c04e3613834421a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1917580
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:116065496
TEST=make buildall -j
Change-Id: Ia723d98354ca027f41f1b3c00d6a2dac500edbf8
Signed-off-by: Craig Hesling <hesling@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1715633
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Sean Abraham <seanabraham@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add EC command to read positive_match_secret on match success.
If the attempt to read is 5 seconds after the match, the read is not
allowed (the readable bit for positive match secret is cleared).
Test that the command can read the data correctly and can
read for each finger only once. Test that attempt to read secret
after deadline will be rejected.
BRANCH=nocturne
BUG=chromium:927095
TEST=make buildall
TEST=tested enrollment, matching and multifinger on DUT nocturne
TEST=tested that if biod requests to download template and secret
for a finger that's not currently matched, reading secret will fail.
Change-Id: Idc734c6392d271e2aaee1cddf7c2c5b81b727b4a
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1679372
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
|
|
This adds the host commands declared in fpsensor_state.c to the
fuzzing mix. They are the following:
EC_CMD_FP_SEED 0x0408
EC_CMD_FP_ENC_STATUS 0x0409
EC_CMD_FP_MODE 0x0402
EC_CMD_FP_CONTEXT 0x0406
This is not the complete fpsensor host command interface.
More host commands will be added in followup CLs.
BRANCH=none
BUG=b:116065496
TEST=# Pull in TEST_COVERAGE fix
git fetch "https://chromium.googlesource.com/chromiumos/platform/ec" \
refs/changes/86/1725186/1 && git cherry-pick FETCH_HEAD
make host-host_command_fuzz TEST_COVERAGE=1
timeout 5m ./build/host/host_command_fuzz/host_command_fuzz.exe
llvm-profdata merge -sparse default.profraw -o default.profdata
llvm-cov show build/host/host_command_fuzz/host_command_fuzz.exe \
--instr-profile=default.profdata --format=html --output-dir=cov
# Inspect cov/.../common/fpsensor/fpsensor_state.c.html to verify
TEST=make buildall -j
Change-Id: I69e9833463944a0dfba49e5671987b7fec565bf4
Signed-off-by: Craig Hesling <hesling@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1661122
|