This is a note to let you know that I've just added the patch titled usb: typec: tcpm: Fix error while calculating PPS out values to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-typec-tcpm-fix-error-while-calculating-pps-out-values.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 374157ff88ae1a7f7927331cbc72c1ec11994e8a Mon Sep 17 00:00:00 2001 From: Badhri Jagan Sridharan <badhri@xxxxxxxxxx> Date: Wed, 14 Apr 2021 22:01:21 -0700 Subject: usb: typec: tcpm: Fix error while calculating PPS out values From: Badhri Jagan Sridharan <badhri@xxxxxxxxxx> commit 374157ff88ae1a7f7927331cbc72c1ec11994e8a upstream. "usb: typec: tcpm: Address incorrect values of tcpm psy for pps supply" introduced a regression for req_out_volt and req_op_curr calculation. req_out_volt should consider the newly calculated max voltage instead of previously accepted max voltage by the port partner. Likewise, req_op_curr should consider the newly calculated max current instead of previously accepted max current by the port partner. Fixes: e3a072022487 ("usb: typec: tcpm: Address incorrect values of tcpm psy for pps supply") Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx> Signed-off-by: Badhri Jagan Sridharan <badhri@xxxxxxxxxx> Link: https://lore.kernel.org/r/20210415050121.1928298-1-badhri@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/typec/tcpm/tcpm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -2339,10 +2339,10 @@ static unsigned int tcpm_pd_select_pps_a port->pps_data.req_max_volt = min(pdo_pps_apdo_max_voltage(src), pdo_pps_apdo_max_voltage(snk)); port->pps_data.req_max_curr = min_pps_apdo_current(src, snk); - port->pps_data.req_out_volt = min(port->pps_data.max_volt, - max(port->pps_data.min_volt, + port->pps_data.req_out_volt = min(port->pps_data.req_max_volt, + max(port->pps_data.req_min_volt, port->pps_data.req_out_volt)); - port->pps_data.req_op_curr = min(port->pps_data.max_curr, + port->pps_data.req_op_curr = min(port->pps_data.req_max_curr, port->pps_data.req_op_curr); } Patches currently in stable-queue which might be from badhri@xxxxxxxxxx are queue-5.4/usb-typec-tcpm-fix-error-while-calculating-pps-out-values.patch