1 /* 2 * Copyright (c) 2023 The Chromium OS Authors 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef _POWER_CTRL_H_ 8 #define _POWER_CTRL_H_ 9 10 /** 11 * @brief VBUS levels 12 */ 13 enum source_t { 14 /* VBUS off */ 15 SOURCE_0V, 16 /* VBUS at default */ 17 SOURCE_5V, 18 /* VBUS at 9V */ 19 SOURCE_9V, 20 /* VBUS at 15V */ 21 SOURCE_15V 22 }; 23 24 /** 25 * @brief VCONN control 26 */ 27 enum vconn_t { 28 /* VCONN OFF */ 29 VCONN_OFF, 30 /* VCONN ON CC1 */ 31 VCONN1_ON, 32 /* VCONN ON CC2 */ 33 VCONN2_ON 34 }; 35 36 /** 37 * @brief Control VCONN 38 */ 39 int vconn_ctrl_set(enum vconn_t v); 40 41 /** 42 * @brief Control VBUS 43 */ 44 int source_ctrl_set(enum source_t v); 45 46 #endif /* _POWER_CTRL_H_ */ 47