aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/typec/tcpm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c
index d961f1ec0e08..150f43668bec 100644
--- a/drivers/usb/typec/tcpm.c
+++ b/drivers/usb/typec/tcpm.c
@@ -725,6 +725,9 @@ static int tcpm_set_current_limit(struct tcpm_port *port, u32 max_ma, u32 mv)
725 725
726 tcpm_log(port, "Setting voltage/current limit %u mV %u mA", mv, max_ma); 726 tcpm_log(port, "Setting voltage/current limit %u mV %u mA", mv, max_ma);
727 727
728 port->supply_voltage = mv;
729 port->current_limit = max_ma;
730
728 if (port->tcpc->set_current_limit) 731 if (port->tcpc->set_current_limit)
729 ret = port->tcpc->set_current_limit(port->tcpc, max_ma, mv); 732 ret = port->tcpc->set_current_limit(port->tcpc, max_ma, mv);
730 733
@@ -2595,8 +2598,6 @@ static void tcpm_reset_port(struct tcpm_port *port)
2595 tcpm_set_attached_state(port, false); 2598 tcpm_set_attached_state(port, false);
2596 port->try_src_count = 0; 2599 port->try_src_count = 0;
2597 port->try_snk_count = 0; 2600 port->try_snk_count = 0;
2598 port->supply_voltage = 0;
2599 port->current_limit = 0;
2600 port->usb_type = POWER_SUPPLY_USB_TYPE_C; 2601 port->usb_type = POWER_SUPPLY_USB_TYPE_C;
2601 2602
2602 power_supply_changed(port->psy); 2603 power_supply_changed(port->psy);