]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usb: typec: ucsi: Set orientation_aware if UCSI version is 2.x and above
authorAbel Vesa <abel.vesa@linaro.org>
Tue, 28 Oct 2025 15:43:03 +0000 (17:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Nov 2025 14:10:34 +0000 (15:10 +0100)
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>
drivers/usb/typec/ucsi/ucsi.c

index ec6c8f928ddaf62074846f9145866ce5074e0965..a7b388dc7fa0fa8adf8426dca97983cad096f420 100644 (file)
@@ -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);