| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thermistor drivers now query the device tree for configuration.
Thermistor tests have been updated to be parameterized
on all thermistors enabled in the device tree.
BRANCH=none
BUG=b:184374937
TEST= 1) zmake testall
2) make runhosttests
Cq-Depend: chromium:3161332
Signed-off-by: Aaron Massey <aaronmassey@chromium.org>
Change-Id: Ic5330cd5c33e79e192428ca857651de9a225856e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3133812
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Aaron Massey <aaronmassey@google.com>
Commit-Queue: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable mocking and add a test using the I2C mock emulator for the
st_raw_read_n function.
BRANCH=none
BUG=b:200589041
TEST=zmake configure --test zephyr/test/drivers
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I2554f1eab898942bc6d68860beba2e1eb02b5aa0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3171695
Tested-by: Yuval Peress <peress@google.com>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the configuration log level needed to show I2C traffic. This will
make it easier for others to enable when debugging tests.
BRANCH=none
BUG=none
TEST=zmake configure --test zephyr/test/drivers
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I238a2f101777a5651ddde537a0359d9c15377587
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3168033
Tested-by: Yuval Peress <peress@google.com>
Auto-Submit: Yuval Peress <peress@google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not override the number of USB-C ports. Enable the port 1 PD task, so
that port 1 behaves as expected during the test.
BUG=b:197747859
TEST=zmake configure --test zephyr/test/drivers
BRANCH=none
Cq-Depend: chromium:3159528
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I3e170c4fd295de7812b1678185a0cd892faf4203
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3138216
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test the LN9310 init function for both 2S and 3S battery types.
BRANCH=none
BUG=b:184856083
TEST=zmake configure --test zephyr/test/drivers
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I6c6804657377cab615f7af6661839b019ab88a8a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3159648
Commit-Queue: Yuval Peress <peress@google.com>
Tested-by: Yuval Peress <peress@google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve the debug output by including the device label in the common
configs.
BRANCH=none
BUG=none
TEST=zmake configure --test zephyr/test/drivers
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Ic331e7842efdfae70d3f994a694c7723fdcd9640
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3144313
Reviewed-by: Tomasz Michalec <tm@semihalf.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bb_retimier init function is tested with I2C communication errors and
wrong values of BB retimer vendor/device ID.
Init function checks state of AP, so CONFIG_PLATFORM_EC_POWERSEQ is
enabled. CONFIG_PLATFORM_EC_POWERSEQ_INTEL and
CONFIG_PLATFORM_EC_POWERSEQ_PP5000_CONTROL are disabled to reduce code
that needs to be mocked.
BUG=b:184856919
BRANCH=none
TEST=make configure --test zephyr/test/drivers
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: Ibaed931f54a797d70fa86297b3eb0181ab2a689d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3140205
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bb_retimer driver is tested using BB retimer emulator. Set mode function
is tested with different usb mux mode and cable configuration.
BUG=b:184856919
BRANCH=none
TEST=zmake configure --test zephyr/test/drivers
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I106435262ccd9123c4fe3cb9063cce68d777cb84
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3110087
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Verify that we can call host commands from driver tests by adding a test
that calls the EC_CMD_GET_PROTOCOL_INFO host command. Add a few
convenience functions to host_command.h when building with CONFIG_ZTEST
enabled. Also, add eSPI emulator to support the test.
Coverage:
- lines 17.4% -> 17.8%
- functions 21.4% -> 22.0%
BRANCH=none
BUG=b:189954415
TEST=zmake configure --test zephyr/test/drivers
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Ib9e750eeab555ea629a560cbf3beed28e346c460
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3031842
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Functions exposed in public API by TCS3400 driver are tested using TCS
emulator. Driver's irq handler is tested in calibration and normal mode.
BUG=b:184856080
BRANCH=none
TEST=run zmake drivers test
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I80fa87accc43c9fd41ab057a2b1026577847275a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3048095
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BMI160 driver is tested using BMI emulator. All functions exposed
in accelgyro_drv are tested for both accelerometer and gyroscope
sensors.
BUG=b:184856157
BRANCH=none
TEST=run zmake drivers test
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: Ica0e40a904c35adbd9a46e70423137e064a75059
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3017985
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BMI260 driver is tested using BMI emulator. All functions exposed
in accelgyro_drv are tested for both accelerometer and gyroscope
sensors.
BUG=b:184856157
BRANCH=none
TEST=run zmake drivers test
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: Id911a161bcbb2fcb87ccdadf266a683859db25d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2997365
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just test enabling VBUS for now.
BUG=b:190519131
TEST=zmake configure --test zephyr/test/drivers
BRANCH=none
Change-Id: I9759e709539ed041dd92c80ab1e49f896f8d6e65
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2994648
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:184852906
BRANCH=none
TEST=zmake configure --test zephyr/test/drivers
Change-Id: Ie554b6957269c638357d82d6f5dcc2ceda08caab
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2961272
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BMA2x2 driver is tested using BMA255 emulator. All functions exposed in
accelgyro_drv are tested.
BUG=b:184855546
BRANCH=none
TEST=run zmake drivers test
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I20a2849b7b11b2a2c152bd07d748cb073cfd86b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2933303
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename CONFIG_CROS_BOARD_INFO to CONFIG_CBI_EEPROM to make it clear
that the information comes from on-board EEPROM.
It sets up the groundwork for adding more options of CBI sources later.
BRANCH=None
BUG=b:186264627
TEST=make buildall -j
Signed-off-by: Philip Chen <philipchen@google.com>
Change-Id: I9a6feee0a8b35bbf29e445544243485507767ad8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2945792
Reviewed-by: Philip Chen <philipchen@chromium.org>
Commit-Queue: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thermistor driver uses ADC to read temperature. Because of that ADC
emulator is added to overlay dts. Thermistor test suite check behaviour
in case of ADC error and test if conversion from ADC output to
temperature is precise.
BUG=b:184857072
BRANCH=none
TEST=run zmake drivers test
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: Icc6c779ce590d2768a382bccfb04acec657a140c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2886888
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add tests for functions from driver/battery/smart.c
To test them, Smart Battery emulator is used.
BUG=b:184855975
BRANCH=none
TEST=run zmake drivers test
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I51bdcc2a18c7f30f037b0273ca1ae584312a574b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2903207
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CBI test suite uses EC code. It is required to use I2C and eeprom
emulators for storage and GPIO emulator for write protect pin. The
overlay.dts is extended with required devices.
BUG=b:185205123
BRANCH=none
TEST=run zmake drivers test
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I2dc743b97aac0efa11624ebba4ac2e1b6811b847
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2821699
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable CONFIG_PLATFORM_EC_EXTPOWER_GPIO and add the necessary emulated
gpio pin. Remove the stub from stubs.c.
BUG=b:185118990
TEST=zmake testall
BRANCH=none
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: Ibfd455f6be4efecd3b686a293ea7a2da8f7ca518
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2821358
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no reason to prevent CONFIG_SHIMMED_TASKS and CONFIG_ZTEST from
being used together.
BUG=b:185118990
TEST=zmake testall
BRANCH=none
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I024ef0faea14fa9ddc38c5ca688e8fa4448691c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2821357
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
|
|
Create a shell of a test that can have many test suites for device
drivers. Currently this test only checks that the EC_BATT_PRES_ODL can
be read correctly by battery_is_present(). But it links in many device
drivers and is a starting point for the next test.
BUG=b:185118990
TEST=It is one
BRANCH=none
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I07c8835015cbe0fec6aaf82f782400e894043a90
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2819029
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
|