aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAbel Vesa <abel.vesa@linaro.org>2025-10-28 17:43:03 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-21 15:10:34 +0100
commit86a35865fefff806d2674982017a47ff082aee0b (patch)
tree98b738b613dc6803727d199bab31175bbfd19a36 /drivers/usb
parenta2fa8a12e6bc9d89c0505b8dd7ae38ec173d25de (diff)
downloadtip-86a35865fefff806d2674982017a47ff082aee0b.tar.gz
usb: typec: ucsi: Set orientation_aware if UCSI version is 2.x and above
For UCSI 2.0 and above, since the orientation is part of the paylad, set the orientation_aware by default and let the implementation specific update_connector op override if necessary. Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20251028-b4-ucsi-set-orientation-aware-on-version-2-and-above-v1-1-d3425f5679af@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/typec/ucsi/ucsi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index ec6c8f928ddaf6..a7b388dc7fa0fa 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -1660,6 +1660,9 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
cap->driver_data = con;
cap->ops = &ucsi_ops;
+ if (ucsi->version >= UCSI_VERSION_2_0)
+ con->typec_cap.orientation_aware = true;
+
if (ucsi->ops->update_connector)
ucsi->ops->update_connector(con);