[Resolute][PATCH 2/2] usb: typec: ucsi: Add SET_POWER_LEVEL UCSI command to debugfs

You-Sheng Yang vicamo.yang at canonical.com
Tue Jan 20 12:45:54 UTC 2026


From: Venkat Jayaraman <venkat.jayaraman at intel.com>

BugLink: https://bugs.launchpad.net/bugs/2137272

Add SET_POWER_LEVEL to list of commands supported by UCSI debugfs.

Signed-off-by: Venkat Jayaraman <venkat.jayaraman at intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus at linux.intel.com>
Link: https://patch.msgid.link/20251026235830.936477-1-venkat.jayaraman@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
(cherry picked from commit 14934421dc8be364e2a7506dccf1222c45ecca24)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
 drivers/usb/typec/ucsi/debugfs.c | 1 +
 drivers/usb/typec/ucsi/ucsi.h    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/usb/typec/ucsi/debugfs.c b/drivers/usb/typec/ucsi/debugfs.c
index f73f2b54554e2..f3684ab787fe6 100644
--- a/drivers/usb/typec/ucsi/debugfs.c
+++ b/drivers/usb/typec/ucsi/debugfs.c
@@ -35,6 +35,7 @@ static int ucsi_cmd(void *data, u64 val)
 	case UCSI_SET_SINK_PATH:
 	case UCSI_SET_NEW_CAM:
 	case UCSI_SET_USB:
+	case UCSI_SET_POWER_LEVEL:
 	case UCSI_READ_POWER_LEVEL:
 		ret = ucsi_send_command(ucsi, val, NULL, 0);
 		break;
diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h
index e301d9012936f..66c4d4122ef5f 100644
--- a/drivers/usb/typec/ucsi/ucsi.h
+++ b/drivers/usb/typec/ucsi/ucsi.h
@@ -127,6 +127,7 @@ void ucsi_connector_change(struct ucsi *ucsi, u8 num);
 #define UCSI_GET_CONNECTOR_STATUS		0x12
 #define UCSI_GET_CONNECTOR_STATUS_SIZE		152
 #define UCSI_GET_ERROR_STATUS			0x13
+#define UCSI_SET_POWER_LEVEL			0x14
 #define UCSI_GET_ATTENTION_VDO			0x16
 #define UCSI_GET_PD_MESSAGE			0x15
 #define UCSI_GET_CAM_CS			0x18
-- 
2.51.0




More information about the kernel-team mailing list