diff options
Diffstat (limited to 'zephyr/test/drivers/common/src/utils.c')
-rw-r--r-- | zephyr/test/drivers/common/src/utils.c | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/zephyr/test/drivers/common/src/utils.c b/zephyr/test/drivers/common/src/utils.c index afea5edbac..719a3fe589 100644 --- a/zephyr/test/drivers/common/src/utils.c +++ b/zephyr/test/drivers/common/src/utils.c @@ -3,34 +3,38 @@ * found in the LICENSE file. */ +#include <zephyr/drivers/gpio/gpio_emul.h> +#include <zephyr/shell/shell.h> +#include <zephyr/shell/shell_dummy.h> /* nocheck */ +#include <zephyr/shell/shell_uart.h> +#include <zephyr/kernel.h> +#include <zephyr/ztest.h> + #include "acpi.h" #include "battery.h" #include "battery_smart.h" #include "charge_state.h" #include "chipset.h" +#include "lpc.h" #include "emul/emul_isl923x.h" #include "emul/emul_smart_battery.h" #include "emul/emul_stub_device.h" #include "emul/tcpc/emul_tcpci_partner_src.h" #include "hooks.h" -#include "lpc.h" #include "power.h" #include "task.h" #include "tcpm/tcpci.h" #include "test/drivers/stubs.h" #include "test/drivers/utils.h" -#include <zephyr/drivers/gpio/gpio_emul.h> -#include <zephyr/kernel.h> -#include <zephyr/shell/shell.h> -#include <zephyr/shell/shell_dummy.h> -#include <zephyr/shell/shell_uart.h> -#include <zephyr/ztest.h> - #define BATTERY_NODE DT_NODELABEL(battery) #define GPIO_BATT_PRES_ODL_PATH DT_PATH(named_gpios, ec_batt_pres_odl) #define GPIO_BATT_PRES_ODL_PORT DT_GPIO_PIN(GPIO_BATT_PRES_ODL_PATH, gpios) +/* + * TODO(b/251281997): Switch zasserts back to zassumes when they loudly fail + */ + void test_set_battery_level(int percentage) { struct sbat_emul_bat_data *bat; @@ -588,21 +592,7 @@ void host_cmd_typec_control_bist_share_mode(int port, int enable) struct host_cmd_handler_args args = BUILD_HOST_COMMAND_PARAMS(EC_CMD_TYPEC_CONTROL, 0, params); - zassert_ok(host_command_process(&args), - "Failed to send Type-C control for port %d", port); -} - -void host_cmd_typec_control_vdm_req(int port, struct typec_vdm_req vdm_req) -{ - struct ec_params_typec_control params = { - .port = port, - .command = TYPEC_CONTROL_COMMAND_SEND_VDM_REQ, - .vdm_req_params = vdm_req, - }; - struct host_cmd_handler_args args = - BUILD_HOST_COMMAND_PARAMS(EC_CMD_TYPEC_CONTROL, 0, params); - - zassert_ok(host_command_process(&args), + zassume_ok(host_command_process(&args), "Failed to send Type-C control for port %d", port); } |