diff options
author | Jameson Thies <[email protected]> | 2024-03-05 02:58:01 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-03-05 13:11:08 +0000 |
commit | 4d0a5a9915793377c0fe1a8d78de6bcd92cea963 (patch) | |
tree | 4ec1a9c0415fc7c1170bf9f5a02d78e3c5126267 | |
parent | d28240785e00ffb889d90368882bf382e22e9555 (diff) |
usb: typec: ucsi: Clean up UCSI_CABLE_PROP macros
Clean up UCSI_CABLE_PROP macros by fixing a bitmask shifting error for
plug type and updating the modal support macro for consistent naming.
Fixes: 3cf657f07918 ("usb: typec: ucsi: Remove all bit-fields")
Cc: [email protected]
Reviewed-by: Benson Leung <[email protected]>
Reviewed-by: Prashant Malani <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Jameson Thies <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/usb/typec/ucsi/ucsi.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h index 7e35ffbe0a6f..469a2baf472e 100644 --- a/drivers/usb/typec/ucsi/ucsi.h +++ b/drivers/usb/typec/ucsi/ucsi.h @@ -259,12 +259,12 @@ struct ucsi_cable_property { #define UCSI_CABLE_PROP_FLAG_VBUS_IN_CABLE BIT(0) #define UCSI_CABLE_PROP_FLAG_ACTIVE_CABLE BIT(1) #define UCSI_CABLE_PROP_FLAG_DIRECTIONALITY BIT(2) -#define UCSI_CABLE_PROP_FLAG_PLUG_TYPE(_f_) ((_f_) & GENMASK(3, 0)) +#define UCSI_CABLE_PROP_FLAG_PLUG_TYPE(_f_) (((_f_) & GENMASK(4, 3)) >> 3) #define UCSI_CABLE_PROPERTY_PLUG_TYPE_A 0 #define UCSI_CABLE_PROPERTY_PLUG_TYPE_B 1 #define UCSI_CABLE_PROPERTY_PLUG_TYPE_C 2 #define UCSI_CABLE_PROPERTY_PLUG_OTHER 3 -#define UCSI_CABLE_PROP_MODE_SUPPORT BIT(5) +#define UCSI_CABLE_PROP_FLAG_MODE_SUPPORT BIT(5) u8 latency; } __packed; |