Skip to content

Commit ac573b9

Browse files
madhum031gregkh
authored andcommitted
usb: typec: ucsi: Add the UCSI commands in debugfs
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 Signed-off-by: Madhu M <madhu.m@intel.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20250402070817.1016635-1-madhu.m@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 00327d7 commit ac573b9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/usb/typec/ucsi/debugfs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,20 @@ static int ucsi_cmd(void *data, u64 val)
3434
case UCSI_CONNECTOR_RESET:
3535
case UCSI_SET_SINK_PATH:
3636
case UCSI_SET_NEW_CAM:
37+
case UCSI_SET_USB:
3738
ret = ucsi_send_command(ucsi, val, NULL, 0);
3839
break;
3940
case UCSI_GET_CAPABILITY:
4041
case UCSI_GET_CONNECTOR_CAPABILITY:
4142
case UCSI_GET_ALTERNATE_MODES:
43+
case UCSI_GET_CAM_SUPPORTED:
4244
case UCSI_GET_CURRENT_CAM:
4345
case UCSI_GET_PDOS:
4446
case UCSI_GET_CABLE_PROPERTY:
4547
case UCSI_GET_CONNECTOR_STATUS:
4648
case UCSI_GET_ERROR_STATUS:
49+
case UCSI_GET_PD_MESSAGE:
50+
case UCSI_GET_ATTENTION_VDO:
4751
case UCSI_GET_CAM_CS:
4852
case UCSI_GET_LPM_PPM_INFO:
4953
ret = ucsi_send_command(ucsi, val,

drivers/usb/typec/ucsi/ucsi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ void ucsi_connector_change(struct ucsi *ucsi, u8 num);
123123
#define UCSI_GET_CONNECTOR_STATUS 0x12
124124
#define UCSI_GET_CONNECTOR_STATUS_SIZE 152
125125
#define UCSI_GET_ERROR_STATUS 0x13
126+
#define UCSI_GET_ATTENTION_VDO 0x16
126127
#define UCSI_GET_PD_MESSAGE 0x15
127128
#define UCSI_GET_CAM_CS 0x18
128129
#define UCSI_SET_SINK_PATH 0x1c
130+
#define UCSI_SET_USB 0x21
129131
#define UCSI_GET_LPM_PPM_INFO 0x22
130132

131133
#define UCSI_CONNECTOR_NUMBER(_num_) ((u64)(_num_) << 16)

0 commit comments

Comments
 (0)