diff options
author | Hans de Goede <hdegoede@redhat.com> | 2019-02-25 13:56:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-19 15:00:34 +0100 |
commit | 09fed4d64d3f1c3f9296d3f67eb19c8bf4b1c0c1 (patch) | |
tree | 0cce47eb8a683cf13398036499014f79b2a74401 /drivers/usb/typec/altmodes | |
parent | fc2f113e5c0ee9a297c62700d8b71809f5785b33 (diff) | |
download | linux-09fed4d64d3f1c3f9296d3f67eb19c8bf4b1c0c1.tar.gz linux-09fed4d64d3f1c3f9296d3f67eb19c8bf4b1c0c1.tar.bz2 linux-09fed4d64d3f1c3f9296d3f67eb19c8bf4b1c0c1.zip |
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>
Diffstat (limited to 'drivers/usb/typec/altmodes')
-rw-r--r-- | drivers/usb/typec/altmodes/displayport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c index 610d790bc9be..1b2afeb1eeb6 100644 --- a/drivers/usb/typec/altmodes/displayport.c +++ b/drivers/usb/typec/altmodes/displayport.c @@ -100,7 +100,7 @@ static int dp_altmode_configure(struct dp_altmode *dp, u8 con) if (dp->data.status & DP_STATUS_PREFER_MULTI_FUNC && pin_assign & DP_PIN_ASSIGN_MULTI_FUNC_MASK) pin_assign &= DP_PIN_ASSIGN_MULTI_FUNC_MASK; - else + else if (pin_assign & DP_PIN_ASSIGN_DP_ONLY_MASK) pin_assign &= DP_PIN_ASSIGN_DP_ONLY_MASK; if (!pin_assign) |