usb: typec: ucsi: UCSI2.0 Set Sink Path command support
authorPooja Katiyar <pooja.katiyar@intel.com>
Mon, 7 Oct 2024 20:59:47 +0000 (13:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Oct 2024 08:17:39 +0000 (10:17 +0200)
Add support for UCSI 2.0 command Set Sink Path to enable/
disable sink path on type-c ports

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Pooja Katiyar <pooja.katiyar@intel.com>
Link: https://lore.kernel.org/r/20241007205947.1591402-1-pooja.katiyar@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/debugfs.c
drivers/usb/typec/ucsi/ucsi.h

index f67733cecfdf5d2b19a1dc8cfb40f78b901bbd11..83ff23086d79487200194b8fa157a49e3935cc1b 100644 (file)
@@ -32,6 +32,7 @@ static int ucsi_cmd(void *data, u64 val)
        case UCSI_SET_UOR:
        case UCSI_SET_PDR:
        case UCSI_CONNECTOR_RESET:
+       case UCSI_SET_SINK_PATH:
                ret = ucsi_send_command(ucsi, val, NULL, 0);
                break;
        case UCSI_GET_CAPABILITY:
index 1cf5aad4c23a9e70230449774a89573636fed164..bcb904813c63d2ee4197b5d387507607b04c192a 100644 (file)
@@ -115,6 +115,7 @@ void ucsi_connector_change(struct ucsi *ucsi, u8 num);
 #define UCSI_GET_CONNECTOR_STATUS      0x12
 #define UCSI_GET_ERROR_STATUS          0x13
 #define UCSI_GET_PD_MESSAGE            0x15
+#define UCSI_SET_SINK_PATH             0x1c
 
 #define UCSI_CONNECTOR_NUMBER(_num_)           ((u64)(_num_) << 16)
 #define UCSI_COMMAND(_cmd_)                    ((_cmd_) & 0xff)