aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrĂ© Draszik <[email protected]>2024-07-10 11:36:13 +0100
committerGreg Kroah-Hartman <[email protected]>2024-08-07 12:49:30 +0200
commitaee4568f42e0d7526207a10944bb89bb45522b59 (patch)
tree5599cf3b312d092960c5a32f7665a44e8c55eabe /include/linux
parent46b1e0f87ba89f0a06ffbde5fe8d13c5af93f94e (diff)
usb: typec: tcpci: use GENMASK() for TCPC_MSG_HDR_INFO_REV
Convert field TCPC_MSG_HDR_INFO_REV from register TCPC_MSG_HDR_INFO to using GENMASK() and FIELD_PREP() so as to keep using a similar approach for all fields. Signed-off-by: AndrĂ© Draszik <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb/tcpci.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/usb/tcpci.h b/include/linux/usb/tcpci.h
index 80652d4f722e..3cd61e9f73b3 100644
--- a/include/linux/usb/tcpci.h
+++ b/include/linux/usb/tcpci.h
@@ -129,9 +129,8 @@
#define TCPC_MSG_HDR_INFO 0x2e
#define TCPC_MSG_HDR_INFO_DATA_ROLE BIT(3)
+#define TCPC_MSG_HDR_INFO_REV GENMASK(2, 1)
#define TCPC_MSG_HDR_INFO_PWR_ROLE BIT(0)
-#define TCPC_MSG_HDR_INFO_REV_SHIFT 1
-#define TCPC_MSG_HDR_INFO_REV_MASK 0x3
#define TCPC_RX_DETECT 0x2f
#define TCPC_RX_DETECT_HARD_RESET BIT(5)