diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-16 09:09:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-16 09:09:24 +0200 |
commit | 500f0716b5f7fd6b0ff3d045588c7588ce2eee1d (patch) | |
tree | 05cfa2e77069af443f06bcfbf327f9aa2050eec7 /drivers/usb/typec | |
parent | 4eb44f69e77141992e305d9e75e021b196071cdd (diff) | |
parent | 9d3cce1e8b8561fed5f383d22a4d6949db4eadbe (diff) |
Merge 4.18-rc5 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec')
-rw-r--r-- | drivers/usb/typec/tcpm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index c732fd703961..74e0cdabfcc8 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -726,6 +726,9 @@ static int tcpm_set_current_limit(struct tcpm_port *port, u32 max_ma, u32 mv) tcpm_log(port, "Setting voltage/current limit %u mV %u mA", mv, max_ma); + port->supply_voltage = mv; + port->current_limit = max_ma; + if (port->tcpc->set_current_limit) ret = port->tcpc->set_current_limit(port->tcpc, max_ma, mv); @@ -2693,8 +2696,6 @@ static void tcpm_reset_port(struct tcpm_port *port) tcpm_set_attached_state(port, false); port->try_src_count = 0; port->try_snk_count = 0; - port->supply_voltage = 0; - port->current_limit = 0; port->usb_type = POWER_SUPPLY_USB_TYPE_C; power_supply_changed(port->psy); |