Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: typec: ucsi: Enable UCSI commands in debugfs

Enable the UCSI commands UCSI_SET_NEW_CAM,
UCSI_GET_ERROR_STATUS, UCSI_GET_CAM_CS, and UCSI_GET_LPM_PPM_INFO
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/20250118172455.701348-2-madhu.m@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Madhu M and committed by
Greg Kroah-Hartman
9bc34429 856a2d59

+6
+4
drivers/usb/typec/ucsi/debugfs.c
··· 33 33 case UCSI_SET_PDR: 34 34 case UCSI_CONNECTOR_RESET: 35 35 case UCSI_SET_SINK_PATH: 36 + case UCSI_SET_NEW_CAM: 36 37 ret = ucsi_send_command(ucsi, val, NULL, 0); 37 38 break; 38 39 case UCSI_GET_CAPABILITY: ··· 43 42 case UCSI_GET_PDOS: 44 43 case UCSI_GET_CABLE_PROPERTY: 45 44 case UCSI_GET_CONNECTOR_STATUS: 45 + case UCSI_GET_ERROR_STATUS: 46 + case UCSI_GET_CAM_CS: 47 + case UCSI_GET_LPM_PPM_INFO: 46 48 ret = ucsi_send_command(ucsi, val, 47 49 &ucsi->debugfs->response, 48 50 sizeof(ucsi->debugfs->response));
+2
drivers/usb/typec/ucsi/ucsi.h
··· 121 121 #define UCSI_GET_CONNECTOR_STATUS_SIZE 152 122 122 #define UCSI_GET_ERROR_STATUS 0x13 123 123 #define UCSI_GET_PD_MESSAGE 0x15 124 + #define UCSI_GET_CAM_CS 0x18 124 125 #define UCSI_SET_SINK_PATH 0x1c 126 + #define UCSI_GET_LPM_PPM_INFO 0x22 125 127 126 128 #define UCSI_CONNECTOR_NUMBER(_num_) ((u64)(_num_) << 16) 127 129 #define UCSI_COMMAND(_cmd_) ((_cmd_) & 0xff)