drivers/platform/chrome/cros_typec_altmode.h
Source file repositories/reference/linux-study-clean/drivers/platform/chrome/cros_typec_altmode.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/chrome/cros_typec_altmode.h- Extension
.h- Size
- 1367 bytes
- Lines
- 52
- Domain
- Driver Families
- Bucket
- drivers/platform
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kconfig.hlinux/usb/typec.h
Detected Declarations
struct cros_typec_portstruct typec_altmodestruct typec_altmode_descstruct typec_displayport_datafunction cros_typec_register_displayportfunction cros_typec_displayport_status_updatefunction cros_typec_register_thunderbolt
Annotated Snippet
#ifndef __CROS_TYPEC_ALTMODE_H__
#define __CROS_TYPEC_ALTMODE_H__
#include <linux/kconfig.h>
#include <linux/usb/typec.h>
struct cros_typec_port;
struct typec_altmode;
struct typec_altmode_desc;
struct typec_displayport_data;
#if IS_ENABLED(CONFIG_TYPEC_DP_ALTMODE)
struct typec_altmode *
cros_typec_register_displayport(struct cros_typec_port *port,
struct typec_altmode_desc *desc,
bool ap_mode_entry);
int cros_typec_displayport_status_update(struct typec_altmode *altmode,
struct typec_displayport_data *data);
#else
static inline struct typec_altmode *
cros_typec_register_displayport(struct cros_typec_port *port,
struct typec_altmode_desc *desc,
bool ap_mode_entry)
{
return typec_port_register_altmode(port->port, desc);
}
static inline int cros_typec_displayport_status_update(struct typec_altmode *altmode,
struct typec_displayport_data *data)
{
return 0;
}
#endif
#if IS_ENABLED(CONFIG_TYPEC_TBT_ALTMODE)
struct typec_altmode *
cros_typec_register_thunderbolt(struct cros_typec_port *port,
struct typec_altmode_desc *desc);
#else
static inline struct typec_altmode *
cros_typec_register_thunderbolt(struct cros_typec_port *port,
struct typec_altmode_desc *desc)
{
return typec_port_register_altmode(port->port, desc);
}
#endif
#endif /* __CROS_TYPEC_ALTMODE_H__ */
Annotation
- Immediate include surface: `linux/kconfig.h`, `linux/usb/typec.h`.
- Detected declarations: `struct cros_typec_port`, `struct typec_altmode`, `struct typec_altmode_desc`, `struct typec_displayport_data`, `function cros_typec_register_displayport`, `function cros_typec_displayport_status_update`, `function cros_typec_register_thunderbolt`.
- Atlas domain: Driver Families / drivers/platform.
- 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.