1 /* 2 * Copyright (c) 2023 The Chromium OS Authors 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_SUBSYS_USBC_PE_SRC_STATES_INTERNAL_H_ 8 #define ZEPHYR_SUBSYS_USBC_PE_SRC_STATES_INTERNAL_H_ 9 10 /** 11 * @brief Init the PE Source State machine 12 */ 13 void pe_src_init(const struct device *dev); 14 15 /** 16 * @brief Handle Source-specific DPM requests 17 */ 18 bool source_dpm_requests(const struct device *dev); 19 20 /** 21 * @brief PE_SRC_Startup State 22 */ 23 void pe_src_startup_entry(void *obj); 24 void pe_src_startup_run(void *obj); 25 void pe_src_startup_exit(void *obj); 26 27 /** 28 * @brief PE_SRC_Discovery State 29 */ 30 void pe_src_discovery_entry(void *obj); 31 void pe_src_discovery_run(void *obj); 32 void pe_src_discovery_exit(void *obj); 33 34 /** 35 * @brief PE_SRC_Send_Capabilities State 36 */ 37 void pe_src_send_capabilities_entry(void *obj); 38 void pe_src_send_capabilities_run(void *obj); 39 void pe_src_send_capabilities_exit(void *obj); 40 41 /** 42 * @brief PE_SRC_Negotiate_Capability State 43 */ 44 void pe_src_negotiate_capability_entry(void *obj); 45 46 /** 47 * @brief PE_SRC_Transition_Supply State 48 */ 49 void pe_src_transition_supply_entry(void *obj); 50 void pe_src_transition_supply_run(void *obj); 51 void pe_src_transition_supply_exit(void *obj); 52 53 /** 54 * @brief PE_SRC_Ready State 55 */ 56 void pe_src_ready_entry(void *obj); 57 void pe_src_ready_run(void *obj); 58 void pe_src_ready_exit(void *obj); 59 60 /** 61 * @brief PE_SRC_Disabled State 62 */ 63 void pe_src_disabled_entry(void *obj); 64 65 /** 66 * @brief PE_SRC_Transition_To_Default State 67 */ 68 void pe_src_transition_to_default_entry(void *obj); 69 void pe_src_transition_to_default_run(void *obj); 70 void pe_src_transition_to_default_exit(void *obj); 71 72 /** 73 * @brief PE_SRC_Hard_Reset State 74 */ 75 void pe_src_hard_reset_entry(void *obj); 76 void pe_src_hard_reset_run(void *obj); 77 void pe_src_hard_reset_exit(void *obj); 78 79 /** 80 * @brief PE_SRC_Capability_Response State 81 */ 82 void pe_src_capability_response_entry(void *obj); 83 void pe_src_capability_response_run(void *obj); 84 void pe_src_capability_response_exit(void *obj); 85 86 /** 87 * @brief PE_SRC_Wait_New_Capabilities State 88 */ 89 void pe_src_wait_new_capabilities_entry(void *obj); 90 void pe_src_wait_new_capabilities_run(void *obj); 91 void pe_src_wait_new_capabilities_exit(void *obj); 92 93 /** 94 * @brief PE_SRC_Hard_Reset_Parent State 95 * 96 * Parent state of PE_SRC_Hard_Reset and 97 * PE_SRC_Hard_Reset_Received States 98 */ 99 void pe_src_hard_reset_parent_entry(void *obj); 100 void pe_src_hard_reset_parent_run(void *obj); 101 void pe_src_hard_reset_parent_exit(void *obj); 102 103 #endif /* ZEPHYR_SUBSYS_USBC_PE_SRC_STATES_INTERNAL_H_ */ 104