usb: typec: altmodes/displayport: Fall back to multi-func pins
authorHans de Goede <hdegoede@redhat.com>
Mon, 25 Feb 2019 12:56:37 +0000 (13:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Mar 2019 14:00:34 +0000 (15:00 +0100)
commit09fed4d64d3f1c3f9296d3f67eb19c8bf4b1c0c1
tree0cce47eb8a683cf13398036499014f79b2a74401
parentfc2f113e5c0ee9a297c62700d8b71809f5785b33
usb: typec: altmodes/displayport: Fall back to multi-func pins

If our port-partner supports both DP-only operation (pin-assignment C)
and multi-func operation (pin-assignment D) and we only support
pin-assignment D and the port-partner prefers DP-only mode, then
before this commit we would and up masking out pin-assignment D from
the available pin-assignments and fail to pick a pin-assignment.

Instead only mask out the multi-func pin-assignments if we support
dp-only pin-assignments, so that we correctly fall-back to a multi-func
pin-assignment in this case (by picking pin-assignment D).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/altmodes/displayport.c