History

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.

André Draszik committed 2 years ago

Commit aee45681 parent 46b1e0f2 files · +2 −3Browse files

Showing the changes to include/linux/usb (1 of 2 files). Show all

Unified · Split

include/linux/usb/tcpci.h+1−2
@@ -129,9 +129,8 @@ · 128 unmodified lines
129129
130130 #define TCPC_MSG_HDR_INFO 0x2e
131131 #define TCPC_MSG_HDR_INFO_DATA_ROLE BIT(3)
132+#define TCPC_MSG_HDR_INFO_REV GENMASK(2, 1)
132133 #define TCPC_MSG_HDR_INFO_PWR_ROLE BIT(0)
133−#define TCPC_MSG_HDR_INFO_REV_SHIFT 1
134−#define TCPC_MSG_HDR_INFO_REV_MASK 0x3
135134
136135 #define TCPC_RX_DETECT 0x2f
137136 #define TCPC_RX_DETECT_HARD_RESET BIT(5)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t