diff options
-rw-r--r-- | driver/ppc/rt1739.c | 2 | ||||
-rw-r--r-- | driver/ppc/rt1739.h | 2 | ||||
-rw-r--r-- | zephyr/program/corsola/starmie/src/ppc.c | 8 |
3 files changed, 11 insertions, 1 deletions
diff --git a/driver/ppc/rt1739.c b/driver/ppc/rt1739.c index ffd7760986..4679290b67 100644 --- a/driver/ppc/rt1739.c +++ b/driver/ppc/rt1739.c @@ -273,7 +273,7 @@ static int rt1739_set_vbus_source_current_limit(int port, enum tcpc_rp_value rp) return write_reg(port, RT1739_REG_VBUS_OC_SETTING, reg); } -static int rt1739_init(int port) +int rt1739_init(int port) { int device_id, oc_setting, sys_ctrl, vbus_switch_ctrl; bool batt_connected = false; diff --git a/driver/ppc/rt1739.h b/driver/ppc/rt1739.h index f4c5e44354..48256da202 100644 --- a/driver/ppc/rt1739.h +++ b/driver/ppc/rt1739.h @@ -134,4 +134,6 @@ extern const struct bc12_drv rt1739_bc12_drv; void rt1739_interrupt(int port); +int rt1739_init(int port); + #endif /* defined(__CROS_EC_PPC_RT1739_H) */ diff --git a/zephyr/program/corsola/starmie/src/ppc.c b/zephyr/program/corsola/starmie/src/ppc.c index 8c1dc2fe7f..505da06473 100644 --- a/zephyr/program/corsola/starmie/src/ppc.c +++ b/zephyr/program/corsola/starmie/src/ppc.c @@ -27,3 +27,11 @@ void ppc_interrupt(enum gpio_signal signal) ppc_chips[0].drv->interrupt(0); } } + +static int set_rt1739(void) +{ + rt1739_init(0); + return 0; +} + +SYS_INIT(set_rt1739, POST_KERNEL, 61); |