usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Fri, 21 Sep 2018 15:04:11 +0000 (16:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:41 +0000 (11:08 -0800)
commit512307dd4f0976fa83d7cf576d10c426869bb3f5
tree82579efd58a6bbf1dbee8e5a394b33db94871fa4
parent08c7103daa0d2da9b693a9fddf139ba33d0de886
usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage

commit 1b6af2f58c2b1522e0804b150ca95e50a9e80ea7 upstream.

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.

Fixes: 2eadc33f40d4 ("typec: tcpm: Add core support for sink side PPS")
Cc: <stable@vger.kernel.org>
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm.c