mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
usb: typec: ucsi: UCSI2.0 Get Error Status data structure changes
Add support for UCSI 2.0 Get Error Status data structure changes to add more error codes to the data structure. Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Pooja Katiyar <pooja.katiyar@intel.com> Link: https://lore.kernel.org/r/20240626185853.2956700-1-pooja.katiyar@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
22d96a2854
commit
d58a767107
@@ -117,6 +117,12 @@ static int ucsi_read_error(struct ucsi *ucsi)
|
||||
case UCSI_ERROR_SWAP_REJECTED:
|
||||
dev_warn(ucsi->dev, "Swap rejected\n");
|
||||
break;
|
||||
case UCSI_ERROR_REVERSE_CURRENT_PROTECTION:
|
||||
dev_warn(ucsi->dev, "Reverse Current Protection detected\n");
|
||||
break;
|
||||
case UCSI_ERROR_SET_SINK_PATH_REJECTED:
|
||||
dev_warn(ucsi->dev, "Set Sink Path rejected\n");
|
||||
break;
|
||||
case UCSI_ERROR_UNDEFINED:
|
||||
default:
|
||||
dev_err(ucsi->dev, "unknown error %u\n", error);
|
||||
|
||||
@@ -198,6 +198,8 @@ void ucsi_connector_change(struct ucsi *ucsi, u8 num);
|
||||
#define UCSI_ERROR_HARD_RESET BIT(10)
|
||||
#define UCSI_ERROR_PPM_POLICY_CONFLICT BIT(11)
|
||||
#define UCSI_ERROR_SWAP_REJECTED BIT(12)
|
||||
#define UCSI_ERROR_REVERSE_CURRENT_PROTECTION BIT(13)
|
||||
#define UCSI_ERROR_SET_SINK_PATH_REJECTED BIT(14)
|
||||
|
||||
#define UCSI_SET_NEW_CAM_ENTER(x) (((x) >> 23) & 0x1)
|
||||
#define UCSI_SET_NEW_CAM_GET_AM(x) (((x) >> 24) & 0xff)
|
||||
|
||||
Reference in New Issue
Block a user