drivers/usb/typec/ucsi/ucsi.c
Source file repositories/reference/linux-study-clean/drivers/usb/typec/ucsi/ucsi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/typec/ucsi/ucsi.c- Extension
.c- Size
- 55327 bytes
- Lines
- 2207
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/completion.hlinux/property.hlinux/device.hlinux/module.hlinux/delay.hlinux/slab.hlinux/usb/typec_dp.hlinux/usb/typec_tbt.hucsi.htrace.h
Detected Declarations
struct ucsi_workfunction Copyrightfunction ucsi_sync_control_commonfunction ucsi_acknowledgefunction ucsi_run_commandfunction ucsi_read_errorfunction ucsi_send_command_commonfunction ucsi_send_commandfunction ucsi_poll_workerfunction ucsi_partner_taskfunction ucsi_altmode_update_activefunction ucsi_altmode_next_modefunction ucsi_next_altmodefunction ucsi_get_num_altmodefunction ucsi_register_altmodefunction ucsi_register_altmodes_nvidiafunction ucsi_register_altmodesfunction ucsi_unregister_altmodesfunction ucsi_get_connector_statusfunction ucsi_read_pdosfunction ucsi_get_pdosfunction ucsi_get_src_pdosfunction ucsi_get_pd_messagefunction ucsi_get_partner_identityfunction ucsi_get_cable_identityfunction ucsi_check_altmodesfunction ucsi_register_device_pdosfunction ucsi_register_partner_pdosfunction ucsi_unregister_partner_pdosfunction ucsi_register_plugfunction ucsi_unregister_plugfunction ucsi_register_cablefunction ucsi_unregister_cablefunction ucsi_check_connector_capabilityfunction ucsi_orientationfunction ucsi_pwr_opmode_changefunction ucsi_register_partnerfunction ucsi_unregister_partnerfunction ucsi_partner_changefunction ucsi_check_connectionfunction ucsi_check_cablefunction ucsi_handle_connector_changefunction ucsi_connector_changefunction ucsi_reset_connectorfunction ucsi_reset_ppmfunction ucsi_role_cmdfunction ucsi_dr_swapfunction ucsi_pr_swap
Annotated Snippet
module_init(ucsi_module_init);
static void __exit ucsi_module_exit(void)
{
ucsi_debugfs_exit();
}
module_exit(ucsi_module_exit);
MODULE_AUTHOR("Heikki Krogerus <heikki.krogerus@linux.intel.com>");
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("USB Type-C Connector System Software Interface driver");
Annotation
- Immediate include surface: `linux/completion.h`, `linux/property.h`, `linux/device.h`, `linux/module.h`, `linux/delay.h`, `linux/slab.h`, `linux/usb/typec_dp.h`, `linux/usb/typec_tbt.h`.
- Detected declarations: `struct ucsi_work`, `function Copyright`, `function ucsi_sync_control_common`, `function ucsi_acknowledge`, `function ucsi_run_command`, `function ucsi_read_error`, `function ucsi_send_command_common`, `function ucsi_send_command`, `function ucsi_poll_worker`, `function ucsi_partner_task`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.