include/linux/usb/typec_dp.h
Source file repositories/reference/linux-study-clean/include/linux/usb/typec_dp.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/usb/typec_dp.h- Extension
.h- Size
- 4803 bytes
- Lines
- 132
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/usb/typec_altmode.hlinux/bitfield.h
Detected Declarations
struct typec_displayport_data
Annotated Snippet
struct typec_displayport_data {
u32 status;
u32 conf;
};
enum {
DP_PIN_ASSIGN_A, /* Not supported after v1.0b */
DP_PIN_ASSIGN_B, /* Not supported after v1.0b */
DP_PIN_ASSIGN_C,
DP_PIN_ASSIGN_D,
DP_PIN_ASSIGN_E,
DP_PIN_ASSIGN_F, /* Not supported after v1.0b */
DP_PIN_ASSIGN_MAX,
};
/* DisplayPort alt mode specific commands */
#define DP_CMD_STATUS_UPDATE VDO_CMD_VENDOR(0)
#define DP_CMD_CONFIGURE VDO_CMD_VENDOR(1)
/* DisplayPort Capabilities VDO bits (returned with Discover Modes) */
#define DP_CAP_CAPABILITY(_cap_) ((_cap_) & 3)
#define DP_CAP_UFP_D 1
#define DP_CAP_DFP_D 2
#define DP_CAP_DFP_D_AND_UFP_D 3
#define DP_CAP_DP_SIGNALLING(_cap_) FIELD_GET(GENMASK(5, 2), _cap_)
#define DP_CAP_SIGNALLING_HBR3 1
#define DP_CAP_SIGNALLING_UHBR10 2
#define DP_CAP_SIGNALLING_UHBR20 3
#define DP_CAP_RECEPTACLE BIT(6)
#define DP_CAP_USB BIT(7)
#define DP_CAP_DFP_D_PIN_ASSIGN(_cap_) FIELD_GET(GENMASK(15, 8), _cap_)
#define DP_CAP_UFP_D_PIN_ASSIGN(_cap_) FIELD_GET(GENMASK(23, 16), _cap_)
/* Get pin assignment taking plug & receptacle into consideration */
#define DP_CAP_PIN_ASSIGN_UFP_D(_cap_) ((_cap_ & DP_CAP_RECEPTACLE) ? \
DP_CAP_UFP_D_PIN_ASSIGN(_cap_) : DP_CAP_DFP_D_PIN_ASSIGN(_cap_))
#define DP_CAP_PIN_ASSIGN_DFP_D(_cap_) ((_cap_ & DP_CAP_RECEPTACLE) ? \
DP_CAP_DFP_D_PIN_ASSIGN(_cap_) : DP_CAP_UFP_D_PIN_ASSIGN(_cap_))
#define DP_CAP_UHBR_13_5_SUPPORT BIT(26)
#define DP_CAP_CABLE_TYPE(_cap_) FIELD_GET(GENMASK(29, 28), _cap_)
#define DP_CAP_CABLE_TYPE_PASSIVE 0
#define DP_CAP_CABLE_TYPE_RE_TIMER 1
#define DP_CAP_CABLE_TYPE_RE_DRIVER 2
#define DP_CAP_CABLE_TYPE_OPTICAL 3
#define DP_CAP_DPAM_VERSION BIT(30)
/* DisplayPort Status Update VDO bits */
#define DP_STATUS_CONNECTION(_status_) ((_status_) & 3)
#define DP_STATUS_CON_DISABLED 0
#define DP_STATUS_CON_DFP_D 1
#define DP_STATUS_CON_UFP_D 2
#define DP_STATUS_CON_BOTH 3
#define DP_STATUS_POWER_LOW BIT(2)
#define DP_STATUS_ENABLED BIT(3)
#define DP_STATUS_PREFER_MULTI_FUNC BIT(4)
#define DP_STATUS_SWITCH_TO_USB BIT(5)
#define DP_STATUS_EXIT_DP_MODE BIT(6)
#define DP_STATUS_HPD_STATE BIT(7) /* 0 = HPD_Low, 1 = HPD_High */
#define DP_STATUS_IRQ_HPD BIT(8)
/* DisplayPort Configurations VDO bits */
#define DP_CONF_CURRENTLY(_conf_) ((_conf_) & 3)
#define DP_CONF_UFP_U_AS_DFP_D BIT(0)
#define DP_CONF_UFP_U_AS_UFP_D BIT(1)
#define DP_CONF_SIGNALLING_MASK GENMASK(5, 2)
#define DP_CONF_SIGNALLING_SHIFT 2
#define DP_CONF_SIGNALLING_HBR3 1
#define DP_CONF_SIGNALLING_UHBR10 2
#define DP_CONF_SIGNALLING_UHBR20 3
#define DP_CONF_PIN_ASSIGNEMENT_SHIFT 8
#define DP_CONF_PIN_ASSIGNEMENT_MASK GENMASK(15, 8)
/* Helper for setting/getting the pin assignment value to the configuration */
#define DP_CONF_SET_PIN_ASSIGN(_a_) ((_a_) << 8)
#define DP_CONF_GET_PIN_ASSIGN(_conf_) FIELD_GET(GENMASK(15, 8), _conf_)
#define DP_CONF_UHBR13_5_SUPPORT BIT(26)
#define DP_CONF_CABLE_TYPE_MASK GENMASK(29, 28)
#define DP_CONF_CABLE_TYPE_SHIFT 28
#define DP_CONF_CABLE_TYPE_PASSIVE 0
#define DP_CONF_CABLE_TYPE_RE_TIMER 1
#define DP_CONF_CABLE_TYPE_RE_DRIVER 2
#define DP_CONF_CABLE_TYPE_OPTICAL 3
#define DP_CONF_DPAM_VERSION BIT(30)
#endif /* __USB_TYPEC_DP_H */
Annotation
- Immediate include surface: `linux/usb/typec_altmode.h`, `linux/bitfield.h`.
- Detected declarations: `struct typec_displayport_data`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.