mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
usb: typec: ucsi: Add support for SET_PDOS command
Add support for UCSI SET_PDOS command as per UCSI specification v2.1 and above to debugfs. Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Pooja Katiyar <pooja.katiyar@intel.com> Link: https://patch.msgid.link/e3e127122c0a6910c4840a13d5c74ab5fc4eb868.1778798352.git.pooja.katiyar@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
201b015f95
commit
cc15435481
|
|
@ -40,6 +40,11 @@ static int ucsi_cmd(void *data, u64 val)
|
|||
case UCSI_READ_POWER_LEVEL:
|
||||
ret = ucsi_send_command(ucsi, val, NULL, 0);
|
||||
break;
|
||||
case UCSI_SET_PDOS:
|
||||
ret = ucsi_write_message_out_command(ucsi, val, NULL, 0,
|
||||
ucsi->debugfs->message_out,
|
||||
UCSI_COMMAND_DATA_LEN(val));
|
||||
break;
|
||||
case UCSI_GET_CAPABILITY:
|
||||
case UCSI_GET_CONNECTOR_CAPABILITY:
|
||||
case UCSI_GET_ALTERNATE_MODES:
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ void ucsi_connector_change(struct ucsi *ucsi, u8 num);
|
|||
#define UCSI_GET_PD_MESSAGE 0x15
|
||||
#define UCSI_GET_CAM_CS 0x18
|
||||
#define UCSI_SET_SINK_PATH 0x1c
|
||||
#define UCSI_SET_PDOS 0x1d
|
||||
#define UCSI_READ_POWER_LEVEL 0x1e
|
||||
#define UCSI_SET_USB 0x21
|
||||
#define UCSI_GET_LPM_PPM_INFO 0x22
|
||||
|
|
@ -215,6 +216,9 @@ void ucsi_connector_change(struct ucsi *ucsi, u8 num);
|
|||
#define UCSI_GET_PD_MESSAGE_TYPE_IDENTITY 4
|
||||
#define UCSI_GET_PD_MESSAGE_TYPE_REVISION 5
|
||||
|
||||
/* Data length bits */
|
||||
#define UCSI_COMMAND_DATA_LEN(_cmd_) (((_cmd_) >> 8) & GENMASK(7, 0))
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
/* Error information returned by PPM in response to GET_ERROR_STATUS command. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user