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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -92,4 +92,8 @@ enum { · 91 unmodified lines | |||
| 92 | #define DP_CONF_PIN_ASSIGNEMENT_SHIFT 8 | 92 | #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 */ |