1 /*
2  * Copyright (c) 2022 The Chromium OS Authors
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_SUBSYS_USBC_PE_SNK_STATES_INTERNAL_H_
8 #define ZEPHYR_SUBSYS_USBC_PE_SNK_STATES_INTERNAL_H_
9 
10 /**
11  * @brief Init the PE Sink State machine
12  */
13 void pe_snk_init(const struct device *dev);
14 
15 /**
16  * @brief Handle Sink-specific DPM requests
17  */
18 bool sink_dpm_requests(const struct device *dev);
19 
20 /**
21  * @brief PE_SNK_Startup Entry State
22  */
23 void pe_snk_startup_entry(void *obj);
24 void pe_snk_startup_run(void *obj);
25 void pe_snk_discovery_entry(void *obj);
26 
27 /**
28  * @brief PE_SNK_Discovery Run State
29  */
30 void pe_snk_discovery_run(void *obj);
31 
32 /**
33  * @brief PE_SNK_Wait_For_Capabilities
34  */
35 void pe_snk_wait_for_capabilities_entry(void *obj);
36 void pe_snk_wait_for_capabilities_run(void *obj);
37 void pe_snk_wait_for_capabilities_exit(void *obj);
38 
39 /**
40  * @brief PE_SNK_Evaluate_Capability Entry State
41  */
42 void pe_snk_evaluate_capability_entry(void *obj);
43 
44 /**
45  * @brief PE_SNK_Select_Capability
46  */
47 void pe_snk_select_capability_entry(void *obj);
48 void pe_snk_select_capability_run(void *obj);
49 void pe_snk_select_capability_exit(void *obj);
50 
51 /**
52  * @brief PE_SNK_Transition_Sink Entry State
53  */
54 void pe_snk_transition_sink_entry(void *obj);
55 void pe_snk_transition_sink_run(void *obj);
56 void pe_snk_transition_sink_exit(void *obj);
57 
58 /**
59  * @brief PE_SNK_Ready Entry State
60  */
61 void pe_snk_ready_entry(void *obj);
62 void pe_snk_ready_run(void *obj);
63 void pe_snk_ready_exit(void *obj);
64 
65 /**
66  * @brief PE_SNK_Hard_Reset
67  */
68 void pe_snk_hard_reset_entry(void *obj);
69 void pe_snk_hard_reset_run(void *obj);
70 
71 /**
72  * @brief PE_SNK_Transition_to_default Entry State
73  */
74 void pe_snk_transition_to_default_entry(void *obj);
75 void pe_snk_transition_to_default_run(void *obj);
76 
77 /**
78  * @brief PE_SNK_Get_Source_Cap Entry State
79  */
80 void pe_snk_get_source_cap_entry(void *obj);
81 void pe_snk_get_source_cap_run(void *obj);
82 void pe_snk_get_source_cap_exit(void *obj);
83 
84 /**
85  * @brief PE_SNK_Give_Sink_Cap Entry state
86  */
87 void pe_snk_give_sink_cap_entry(void *obj);
88 void pe_snk_give_sink_cap_run(void *obj);
89 
90 #endif /* ZEPHYR_SUBSYS_USBC_PE_SNK_STATES_INTERNAL_H_ */
91