diff options
| author | André Draszik <andre.draszik@linaro.org> | 2024-07-10 13:36:14 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-08-07 13:49:30 +0300 |
| commit | 7cd41974d2c81055f61ba9f69e31c02e866716e0 (patch) | |
| tree | b8038aefc1648d6b4dfca304b56b5fcf99b9a4c4 /include/linux/usb | |
| parent | aee4568f42e0d7526207a10944bb89bb45522b59 (diff) | |
| download | linux-7cd41974d2c81055f61ba9f69e31c02e866716e0.tar.xz | |
usb: typec: tcpci: use GENMASK() for TCPC_TRANSMIT register fields
Convert all fields from register TCPC_TRANSMIT to using GENMASK() and
FIELD_PREP() so as to keep using a similar approach throughout the code
base and make it arguably easier to read.
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-7-0ec1f41f4263@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
| -rw-r--r-- | include/linux/usb/tcpci.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/usb/tcpci.h b/include/linux/usb/tcpci.h index 3cd61e9f73b3..f7f5cfbdef12 100644 --- a/include/linux/usb/tcpci.h +++ b/include/linux/usb/tcpci.h @@ -148,10 +148,8 @@ #define TCPC_RX_DATA 0x34 /* through 0x4f */ #define TCPC_TRANSMIT 0x50 -#define TCPC_TRANSMIT_RETRY_SHIFT 4 -#define TCPC_TRANSMIT_RETRY_MASK 0x3 -#define TCPC_TRANSMIT_TYPE_SHIFT 0 -#define TCPC_TRANSMIT_TYPE_MASK 0x7 +#define TCPC_TRANSMIT_RETRY GENMASK(5, 4) +#define TCPC_TRANSMIT_TYPE GENMASK(2, 0) #define TCPC_TX_BYTE_CNT 0x51 #define TCPC_TX_HDR 0x52 |
