Skip to contentSkip to conversation

usb: typec: ucsi: Add the UCSI commands in debugfs

PATCH Superseded [email protected] 2 participants 2 messages Mar 28, 2025

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 usb: typec: ucsi: Add the UCSI commands in debugfs

From: Madhu M <[email protected]>

Added the UCSI commands UCSI_GET_CAM_SUPPORTED, UCSI_GET_PD_MESSAGE, UCSI_GET_ATTENTION_VDO and UCSI_SET_USB support in debugfs to enhance PD/TypeC debugging capability.

---
Changes in v1:
- Removed UCSI_READ_POWER_LEVEL and UCSI_SET_PDOS commands.
- Modified commit messages.

---
 drivers/usb/typec/ucsi/debugfs.c | 4 ++++
 drivers/usb/typec/ucsi/ucsi.h    | 2 ++
 2 files changed, 6 insertions(+)
drivers/usb/typec/ucsi/debugfs.c +4 -0
index eae2b18a2d8a..92ebf1a2defd 100644
@@ -34,16 +34,20 @@ static int ucsi_cmd(void *data, u64 val)
 	case UCSI_CONNECTOR_RESET:
 	case UCSI_SET_SINK_PATH:
 	case UCSI_SET_NEW_CAM:
+	case UCSI_SET_USB:
 		ret = ucsi_send_command(ucsi, val, NULL, 0);
 		break;
 	case UCSI_GET_CAPABILITY:
 	case UCSI_GET_CONNECTOR_CAPABILITY:
 	case UCSI_GET_ALTERNATE_MODES:
+	case UCSI_GET_CAM_SUPPORTED:
 	case UCSI_GET_CURRENT_CAM:
 	case UCSI_GET_PDOS:
 	case UCSI_GET_CABLE_PROPERTY:
 	case UCSI_GET_CONNECTOR_STATUS:
 	case UCSI_GET_ERROR_STATUS:
+	case UCSI_GET_PD_MESSAGE:
+	case UCSI_GET_ATTENTION_VDO:
 	case UCSI_GET_CAM_CS:
 	case UCSI_GET_LPM_PPM_INFO:
 		ret = ucsi_send_command(ucsi, val,
drivers/usb/typec/ucsi/ucsi.h +2 -0
index 3a2c1762bec1..72b9d5a42961 100644
@@ -123,9 +123,11 @@ 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_GET_ATTENTION_VDO			0x16
 #define UCSI_GET_PD_MESSAGE			0x15
 #define UCSI_GET_CAM_CS			0x18
 #define UCSI_SET_SINK_PATH			0x1c
+#define UCSI_SET_USB				0x21
 #define UCSI_GET_LPM_PPM_INFO			0x22
 
 #define UCSI_CONNECTOR_NUMBER(_num_)		((u64)(_num_) << 16)
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 6 lines · On Fri, Mar 28, 2025 at 05:20:41PM +0530, [email protected] wrote:

From: Madhu M <[email protected]>

Added the UCSI commands UCSI_GET_CAM_SUPPORTED, UCSI_GET_PD_MESSAGE, UCSI_GET_ATTENTION_VDO and UCSI_SET_USB support in debugfs to enhance PD/TypeC debugging capability.

Quoted 6 lines

---
Changes in v1:
- Removed UCSI_READ_POWER_LEVEL and UCSI_SET_PDOS commands.
- Modified commit messages.

I see 3 different v2 patches on the list from you now, which obviously is not correct :(

Please slow down, take a day or so at the least, and work with Heikki to submit this properly. There is no rush here.

greg k-h