History

usb: typec: displayport: Move the Configuration VDO helpers to the header

The helpers used for reading and writing the pin assignment from and to the Configuration VDO will be useful in GPU drivers, and also UCSI driver after DisplayPort alt mode support is added to it.

Heikki Krogerus committed 7 years ago

Commit 382e8fa1 parent 25b01612 files · +4 −4Browse files

Unified · Split

2 files
  1. drivers/usb/typec/altmodes/displayport.c +0 −4
  2. include/linux/usb/typec_dp.h +4 −0
drivers/usb/typec/altmodes/displayport.c+0−4
@@ -24,10 +24,6 @@ enum { · 23 unmodified lines
24 DP_CONF_DUAL_D,24 DP_CONF_DUAL_D,
25};25};
26 26
27/* Helper for setting/getting the pin assignement value to the configuration */
28#define DP_CONF_SET_PIN_ASSIGN(_a_) ((_a_) << 8)
29#define DP_CONF_GET_PIN_ASSIGN(_conf_) (((_conf_) & GENMASK(15, 8)) >> 8)
30
31/* Pin assignments that use USB3.1 Gen2 signaling to carry DP protocol */27/* Pin assignments that use USB3.1 Gen2 signaling to carry DP protocol */
32#define DP_PIN_ASSIGN_GEN2_BR_MASK (BIT(DP_PIN_ASSIGN_A) | \28#define DP_PIN_ASSIGN_GEN2_BR_MASK (BIT(DP_PIN_ASSIGN_A) | \
33 BIT(DP_PIN_ASSIGN_B))29 BIT(DP_PIN_ASSIGN_B))
include/linux/usb/typec_dp.h+4−0
@@ -92,4 +92,8 @@ enum { · 91 unmodified lines
92#define DP_CONF_PIN_ASSIGNEMENT_SHIFT 892#define DP_CONF_PIN_ASSIGNEMENT_SHIFT 8
93#define DP_CONF_PIN_ASSIGNEMENT_MASK GENMASK(15, 8)93#define DP_CONF_PIN_ASSIGNEMENT_MASK GENMASK(15, 8)
94 94
95/* Helper for setting/getting the pin assignement value to the configuration */
96#define DP_CONF_SET_PIN_ASSIGN(_a_) ((_a_) << 8)
97#define DP_CONF_GET_PIN_ASSIGN(_conf_) (((_conf_) & GENMASK(15, 8)) >> 8)
98
95#endif /* __USB_TYPEC_DP_H */99#endif /* __USB_TYPEC_DP_H */

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