summaryrefslogtreecommitdiff
path: root/drivers/usb/typec/ucsi/psy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/typec/ucsi/psy.c')
-rw-r--r--drivers/usb/typec/ucsi/psy.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/typec/ucsi/psy.c b/drivers/usb/typec/ucsi/psy.c
index 26ed0b520749..571a51e16234 100644
--- a/drivers/usb/typec/ucsi/psy.c
+++ b/drivers/usb/typec/ucsi/psy.c
@@ -238,4 +238,13 @@ void ucsi_unregister_port_psy(struct ucsi_connector *con)
return;
power_supply_unregister(con->psy);
+ con->psy = NULL;
+}
+
+void ucsi_port_psy_changed(struct ucsi_connector *con)
+{
+ if (IS_ERR_OR_NULL(con->psy))
+ return;
+
+ power_supply_changed(con->psy);
}