summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/default/src/i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/test/drivers/default/src/i2c.c')
-rw-r--r--zephyr/test/drivers/default/src/i2c.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/zephyr/test/drivers/default/src/i2c.c b/zephyr/test/drivers/default/src/i2c.c
index ca27fedbb2..caced4aedf 100644
--- a/zephyr/test/drivers/default/src/i2c.c
+++ b/zephyr/test/drivers/default/src/i2c.c
@@ -3,14 +3,14 @@
* found in the LICENSE file.
*/
+#include <zephyr/kernel.h>
+#include <zephyr/ztest.h>
+
#include "ec_commands.h"
#include "host_command.h"
#include "i2c.h"
#include "test/drivers/test_state.h"
-#include <zephyr/kernel.h>
-#include <zephyr/ztest.h>
-
ZTEST_USER(i2c, test_i2c_set_speed_success)
{
struct ec_response_i2c_control response;
@@ -52,29 +52,12 @@ ZTEST_USER(i2c, test_i2c_set_speed_success)
"response.cmd_response.speed_khz = %d",
response.cmd_response.speed_khz);
- /* Set the speed to 1000. */
- set_params.cmd_params.speed_khz = 1000;
- zassert_ok(host_command_process(&set_args), NULL);
- zassert_ok(set_args.result, NULL);
- zassert_equal(set_args.response_size, sizeof(response), NULL);
- zassert_equal(response.cmd_response.speed_khz, 400,
- "response.cmd_response.speed_khz = %d",
- response.cmd_response.speed_khz);
-
- /* Get the speed to verify. */
- zassert_ok(host_command_process(&get_args), NULL);
- zassert_ok(get_args.result, NULL);
- zassert_equal(get_args.response_size, sizeof(response), NULL);
- zassert_equal(response.cmd_response.speed_khz, 1000,
- "response.cmd_response.speed_khz = %d",
- response.cmd_response.speed_khz);
-
/* Set the speed back to 100. */
set_params.cmd_params.speed_khz = 100;
zassert_ok(host_command_process(&set_args), NULL);
zassert_ok(set_args.result, NULL);
zassert_equal(set_args.response_size, sizeof(response), NULL);
- zassert_equal(response.cmd_response.speed_khz, 1000,
+ zassert_equal(response.cmd_response.speed_khz, 400,
"response.cmd_response.speed_khz = %d",
response.cmd_response.speed_khz);
}