summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/host_cmd/src/charge_manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/test/drivers/host_cmd/src/charge_manager.c')
-rw-r--r--zephyr/test/drivers/host_cmd/src/charge_manager.c48
1 files changed, 2 insertions, 46 deletions
diff --git a/zephyr/test/drivers/host_cmd/src/charge_manager.c b/zephyr/test/drivers/host_cmd/src/charge_manager.c
index 6bbf7a3ae3..7298b8e135 100644
--- a/zephyr/test/drivers/host_cmd/src/charge_manager.c
+++ b/zephyr/test/drivers/host_cmd/src/charge_manager.c
@@ -3,12 +3,12 @@
* found in the LICENSE file.
*/
+#include <zephyr/ztest.h>
+
#include "charge_manager.h"
#include "host_command.h"
#include "test/drivers/test_state.h"
-#include <zephyr/ztest.h>
-
ZTEST_USER(charge_manager, test_port_count)
{
struct ec_response_charge_port_count response = { 0 };
@@ -44,49 +44,5 @@ ZTEST_USER(charge_manager, test_port_override__0_from_off)
zassert_ok(host_command_process(&args));
}
-ZTEST_USER(charge_manager, test_charge_state_get_debug_params)
-{
- struct ec_params_charge_state params = {
- .cmd = CHARGE_STATE_CMD_GET_PARAM,
- };
- struct ec_response_charge_state response = { 0 };
- struct host_cmd_handler_args args =
- BUILD_HOST_COMMAND(EC_CMD_CHARGE_STATE, 0, response, params);
-
- /* Check that the following get commands work on these debug parameters.
- * The values being asserted are the default values when nothing is
- * plugged in. This should be enough since the test only needs to verify
- * that the command gets the current value. Tests that verify the
- * charging behavior exist elsewhere (under
- * default/src/integration/usbc).
- */
- params.get_param.param = CS_PARAM_DEBUG_CTL_MODE;
- zassert_ok(host_command_process(&args));
- zassert_equal(0, response.get_param.value);
-
- params.get_param.param = CS_PARAM_DEBUG_MANUAL_CURRENT;
- zassert_ok(host_command_process(&args));
- zassert_equal(0xffffffff, response.get_param.value);
-
- params.get_param.param = CS_PARAM_DEBUG_MANUAL_VOLTAGE;
- zassert_ok(host_command_process(&args));
- zassert_equal(0xffffffff, response.get_param.value);
-
- params.get_param.param = CS_PARAM_DEBUG_SEEMS_DEAD;
- zassert_ok(host_command_process(&args));
- zassert_equal(0, response.get_param.value);
-
- params.get_param.param = CS_PARAM_DEBUG_SEEMS_DISCONNECTED;
- zassert_ok(host_command_process(&args));
- zassert_equal(0, response.get_param.value);
-
- params.get_param.param = CS_PARAM_DEBUG_BATT_REMOVED;
- zassert_ok(host_command_process(&args));
- zassert_equal(0, response.get_param.value);
-
- params.get_param.param = CS_PARAM_DEBUG_MAX;
- zassert_equal(EC_ERROR_INVAL, host_command_process(&args));
-}
-
ZTEST_SUITE(charge_manager, drivers_predicate_post_main, NULL, NULL, NULL,
NULL);