diff options
Diffstat (limited to 'common/mock')
-rw-r--r-- | common/mock/charge_manager_mock.c | 4 | ||||
-rw-r--r-- | common/mock/dp_alt_mode_mock.c | 2 | ||||
-rw-r--r-- | common/mock/fp_sensor_mock.c | 4 | ||||
-rw-r--r-- | common/mock/fpsensor_crypto_mock.c | 9 | ||||
-rw-r--r-- | common/mock/fpsensor_state_mock.c | 6 | ||||
-rw-r--r-- | common/mock/mkbp_events_mock.c | 4 | ||||
-rw-r--r-- | common/mock/rollback_latest_mock.c | 6 | ||||
-rw-r--r-- | common/mock/rollback_mock.c | 8 | ||||
-rw-r--r-- | common/mock/usb_mux_mock.c | 4 | ||||
-rw-r--r-- | common/mock/usb_pd_dpm_mock.c | 10 | ||||
-rw-r--r-- | common/mock/usb_pe_sm_mock.c | 6 | ||||
-rw-r--r-- | common/mock/usb_prl_mock.c | 9 | ||||
-rw-r--r-- | common/mock/usb_tc_sm_mock.c | 4 |
13 files changed, 35 insertions, 41 deletions
diff --git a/common/mock/charge_manager_mock.c b/common/mock/charge_manager_mock.c index 745b37efa7..c800b9b9b1 100644 --- a/common/mock/charge_manager_mock.c +++ b/common/mock/charge_manager_mock.c @@ -8,12 +8,12 @@ * @brief Mock charge_manager */ +#include <stdlib.h> + #include "charge_manager.h" #include "common.h" #include "mock/charge_manager_mock.h" -#include <stdlib.h> - #ifndef TEST_BUILD #error "Mocks should only be in the test build." #endif diff --git a/common/mock/dp_alt_mode_mock.c b/common/mock/dp_alt_mode_mock.c index ed769ed4b5..e261415aaa 100644 --- a/common/mock/dp_alt_mode_mock.c +++ b/common/mock/dp_alt_mode_mock.c @@ -10,8 +10,8 @@ */ #include "console.h" -#include "mock/dp_alt_mode_mock.h" #include "usb_dp_alt_mode.h" +#include "mock/dp_alt_mode_mock.h" #ifndef TEST_BUILD #error "Mocks should only be in the test build." diff --git a/common/mock/fp_sensor_mock.c b/common/mock/fp_sensor_mock.c index 57a4f42ae9..4db25a821c 100644 --- a/common/mock/fp_sensor_mock.c +++ b/common/mock/fp_sensor_mock.c @@ -8,12 +8,12 @@ * @brief Mock fpsensor private driver */ +#include <stdlib.h> + #include "common.h" #include "fpsensor.h" #include "mock/fp_sensor_mock.h" -#include <stdlib.h> - #ifndef TEST_BUILD #error "Mocks should only be in the test build." #endif diff --git a/common/mock/fpsensor_crypto_mock.c b/common/mock/fpsensor_crypto_mock.c index 334f98300a..f2cc425c8f 100644 --- a/common/mock/fpsensor_crypto_mock.c +++ b/common/mock/fpsensor_crypto_mock.c @@ -7,17 +7,16 @@ * @file fpsensor_crypto_mock.c * @brief Mock fpsensor_crypto library */ +#include "sha256.h" +#include <stdio.h> +#include <stdint.h> +#include <string.h> #include "assert.h" #include "compile_time_macros.h" #include "console.h" #include "ec_commands.h" #include "fpsensor_private.h" #include "mock/fpsensor_crypto_mock.h" -#include "sha256.h" - -#include <stdint.h> -#include <stdio.h> -#include <string.h> #ifndef TEST_BUILD #error "Mocks should only be in the test build." diff --git a/common/mock/fpsensor_state_mock.c b/common/mock/fpsensor_state_mock.c index d71285c1de..cbeb29ae3c 100644 --- a/common/mock/fpsensor_state_mock.c +++ b/common/mock/fpsensor_state_mock.c @@ -3,14 +3,14 @@ * found in the LICENSE file. */ +#include <stddef.h> +#include <string.h> + #include "common.h" #include "driver/fingerprint/fpsensor.h" #include "ec_commands.h" #include "test_util.h" -#include <stddef.h> -#include <string.h> - #ifndef TEST_BUILD #error "Mocks should only be in the test build." #endif diff --git a/common/mock/mkbp_events_mock.c b/common/mock/mkbp_events_mock.c index 559cb1494d..3f4d76b659 100644 --- a/common/mock/mkbp_events_mock.c +++ b/common/mock/mkbp_events_mock.c @@ -8,11 +8,11 @@ * @brief Mock event handling for MKBP keyboard protocol */ +#include <stdint.h> + #include "common.h" #include "mock/mkbp_events_mock.h" -#include <stdint.h> - #ifndef TEST_BUILD #error "Mocks should only be in the test build." #endif diff --git a/common/mock/rollback_latest_mock.c b/common/mock/rollback_latest_mock.c index b3433246d7..ab62645a1c 100644 --- a/common/mock/rollback_latest_mock.c +++ b/common/mock/rollback_latest_mock.c @@ -8,13 +8,13 @@ * @brief Mock rollback block library */ +#include <string.h> + #include "common.h" #include "compile_time_macros.h" +#include "util.h" #include "mock/rollback_latest_mock.h" #include "rollback_private.h" -#include "util.h" - -#include <string.h> #ifndef TEST_BUILD #error "Mocks should only be in the test build." diff --git a/common/mock/rollback_mock.c b/common/mock/rollback_mock.c index 9395248a61..e68616df53 100644 --- a/common/mock/rollback_mock.c +++ b/common/mock/rollback_mock.c @@ -8,13 +8,13 @@ * @brief Mock rollback block library */ +#include <stdint.h> +#include <string.h> + #include "common.h" #include "compile_time_macros.h" -#include "mock/rollback_mock.h" #include "util.h" - -#include <stdint.h> -#include <string.h> +#include "mock/rollback_mock.h" #ifndef TEST_BUILD #error "Mocks should only be in the test build." diff --git a/common/mock/usb_mux_mock.c b/common/mock/usb_mux_mock.c index b612f47d4f..815cdf777c 100644 --- a/common/mock/usb_mux_mock.c +++ b/common/mock/usb_mux_mock.c @@ -6,9 +6,9 @@ #include "common.h" #include "console.h" -#include "memory.h" -#include "mock/usb_mux_mock.h" #include "usb_mux.h" +#include "mock/usb_mux_mock.h" +#include "memory.h" #ifndef CONFIG_COMMON_RUNTIME #define cprints(format, args...) diff --git a/common/mock/usb_pd_dpm_mock.c b/common/mock/usb_pd_dpm_mock.c index 66b7ccfc2b..158c53c650 100644 --- a/common/mock/usb_pd_dpm_mock.c +++ b/common/mock/usb_pd_dpm_mock.c @@ -8,9 +8,9 @@ * Refer to USB PD 3.0 spec, version 2.0, sections 8.2 and 8.3 */ -#include "memory.h" -#include "mock/usb_pd_dpm_mock.h" #include "usb_pd.h" +#include "mock/usb_pd_dpm_mock.h" +#include "memory.h" #include "usb_pd_tcpm.h" #ifndef TEST_BUILD @@ -49,7 +49,7 @@ void dpm_set_mode_exit_request(int port) { } -void dpm_run(int port, int evt, int en) +void dpm_run(int port) { } @@ -95,7 +95,3 @@ int dpm_get_status_msg(int port, uint8_t *msg, uint32_t *len) void dpm_handle_alert(int port, uint32_t ado) { } - -void dpm_set_pe_ready(int port, bool enable) -{ -} diff --git a/common/mock/usb_pe_sm_mock.c b/common/mock/usb_pe_sm_mock.c index 38df938c46..24861a73f9 100644 --- a/common/mock/usb_pe_sm_mock.c +++ b/common/mock/usb_pe_sm_mock.c @@ -7,11 +7,11 @@ #include "common.h" #include "console.h" -#include "memory.h" -#include "mock/usb_pe_sm_mock.h" #include "usb_pd.h" -#include "usb_pd_tcpm.h" #include "usb_pe_sm.h" +#include "mock/usb_pe_sm_mock.h" +#include "memory.h" +#include "usb_pd_tcpm.h" #ifndef CONFIG_COMMON_RUNTIME #define cprints(format, args...) diff --git a/common/mock/usb_prl_mock.c b/common/mock/usb_prl_mock.c index 769cd6073c..df61cfaf95 100644 --- a/common/mock/usb_prl_mock.c +++ b/common/mock/usb_prl_mock.c @@ -4,17 +4,16 @@ * * Mock Protocol Layer module. */ +#include <string.h> #include "common.h" +#include "usb_emsg.h" +#include "usb_pe_sm.h" +#include "usb_prl_sm.h" #include "mock/usb_prl_mock.h" #include "task.h" #include "test_util.h" #include "timer.h" -#include "usb_emsg.h" #include "usb_pd_tcpm.h" -#include "usb_pe_sm.h" -#include "usb_prl_sm.h" - -#include <string.h> #ifndef TEST_BUILD #error "Mocks should only be in the test build." diff --git a/common/mock/usb_tc_sm_mock.c b/common/mock/usb_tc_sm_mock.c index 6adf6b3246..5badc6eba6 100644 --- a/common/mock/usb_tc_sm_mock.c +++ b/common/mock/usb_tc_sm_mock.c @@ -8,9 +8,9 @@ #include "common.h" #include "console.h" #include "ec_commands.h" -#include "memory.h" -#include "mock/usb_tc_sm_mock.h" #include "usb_tc_sm.h" +#include "mock/usb_tc_sm_mock.h" +#include "memory.h" #ifndef CONFIG_COMMON_RUNTIME #define cprints(format, args...) |