usb: typec: tcpm: pdo matching optimization
authorLi Jun <jun.li@nxp.com>
Mon, 16 Apr 2018 06:54:33 +0000 (14:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Apr 2018 14:06:26 +0000 (16:06 +0200)
commit53fe0de9a35d7149e17dcdd03c55def617a937a7
treec1378388586a6ef54bc00ab600500e4ec1ed3ca9
parent5d111f5190848d6fb1c414dc57797efea3526a2f
usb: typec: tcpm: pdo matching optimization

This patch is a combination of commit 57e6f0d7b804
("typec: tcpm: Only request matching pdos") and source
pdo selection optimization based on it, instead of only
compare between the same pdo type of sink and source,
we should check source pdo voltage range is within the
voltage range of one sink pdo.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm.c