usb-c: clear cache cc_voltage variable.

when not clearing cc_voltage the type-c current limit
will only be reported on the first plug in.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
This commit is contained in:
Johan Carlsson 2024-10-21 15:35:51 +02:00 committed by Benjamin Cabé
commit 0fa9ef8b07

View file

@ -205,6 +205,9 @@ void tc_attached_snk_entry(void *obj)
LOG_INF("Attached.SNK");
/* Clear cached CC voltage */
tc->cc_voltage = TC_CC_VOLT_OPEN;
/* Set CC polarity */
ret = tcpc_set_cc_polarity(tcpc, tc->cc_polarity);
if (ret != 0) {