aboutsummaryrefslogtreecommitdiff
path: root/include/linux/usb
diff options
context:
space:
mode:
authorAndrĂ© Draszik <[email protected]>2024-07-10 11:36:12 +0100
committerGreg Kroah-Hartman <[email protected]>2024-08-07 12:49:30 +0200
commit46b1e0f87ba89f0a06ffbde5fe8d13c5af93f94e (patch)
treea9de25b7901d4ad64803ec0c6234258061ad34c2 /include/linux/usb
parent83b254c13ac093810e1058d9cb1bbb4b7ef9c246 (diff)
usb: typec: tcpci: use GENMASK() for TCPC_ROLE_CTRL_RP_VAL
Align the last remaining field TCPC_ROLE_CTRL_RP_VAL with the other fields in the TCPC_ROLE_CTRL register by using GENMASK() and FIELD_PREP(). 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/usb')
-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 552d074429f0..80652d4f722e 100644
--- a/include/linux/usb/tcpci.h
+++ b/include/linux/usb/tcpci.h
@@ -63,8 +63,7 @@
#define TCPC_ROLE_CTRL 0x1a
#define TCPC_ROLE_CTRL_DRP BIT(6)
-#define TCPC_ROLE_CTRL_RP_VAL_SHIFT 4
-#define TCPC_ROLE_CTRL_RP_VAL_MASK 0x3
+#define TCPC_ROLE_CTRL_RP_VAL GENMASK(5, 4)
#define TCPC_ROLE_CTRL_RP_VAL_DEF 0x0
#define TCPC_ROLE_CTRL_RP_VAL_1_5 0x1
#define TCPC_ROLE_CTRL_RP_VAL_3_0 0x2