patch "usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage" added to usb-next
Subsystems (4)
This is a note to let you know that I've just added the patch titled
usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release during the merge window.
If you have any questions about this process, please let me know.
Quoted 1 line
From
1b6af2f58c2b1522e0804b150ca95e50a9e80ea7Mon Sep 17 00:00:00 2001
From: Adam Thomson <[email protected]>
Date: Fri, 21 Sep 2018 16:04:11 +0100
Subject: usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage
Current code mistakenly checks against max current to determine order but this should be max voltage. This commit fixes the issue so order is correctly determined, thus avoiding failure based on a higher voltage PPS APDO having a lower maximum current output, which is actually valid.
--- drivers/usb/typec/tcpm/tcpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/typec/tcpm/tcpm.c +2 -2
@@ -1430,8 +1430,8 @@ static enum pdo_err tcpm_caps_err(struct tcpm_port *port, const u32 *pdo,if (pdo_apdo_type (pdo[i]) !=APDO_TYPE_PPS )break ; -if (pdo_pps_apdo_max_current (pdo[i]) < -pdo_pps_apdo_max_current (pdo[i -1 ])) +if (pdo_pps_apdo_max_voltage (pdo[i]) < +pdo_pps_apdo_max_voltage (pdo[i -1 ]))return PDO_ERR_PPS_APDO_NOT_SORTED ; else if (pdo_pps_apdo_min_voltage(pdo[i]) == pdo_pps_apdo_min_voltage(pdo[i - 1]) &&
Signature · 1 line
2.19.0