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 <andre.draszik@linaro.org> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20240710-tcpc-cleanup-v1-6-0ec1f41f4263@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
46b1e0f87b
commit
aee4568f42
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user