From: Abel Vesa Date: Tue, 28 Oct 2025 15:43:03 +0000 (+0200) Subject: usb: typec: ucsi: Set orientation_aware if UCSI version is 2.x and above X-Git-Tag: v6.19-rc1~63^2~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86a35865fefff806d2674982017a47ff082aee0b;p=thirdparty%2Flinux.git 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 Reviewed-by: Heikki Krogerus Reviewed-by: Dmitry Baryshkov 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 --- diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index ec6c8f928ddaf..a7b388dc7fa0f 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);