drivers/extcon/extcon.c
Source file repositories/reference/linux-study-clean/drivers/extcon/extcon.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/extcon/extcon.c- Extension
.c- Size
- 37871 bytes
- Lines
- 1489
- Domain
- Driver Families
- Bucket
- drivers/extcon
- 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/module.hlinux/types.hlinux/idr.hlinux/init.hlinux/device.hlinux/fs.hlinux/err.hlinux/of.hlinux/slab.hlinux/sysfs.hextcon.h
Detected Declarations
struct extcon_cablefunction check_mutually_exclusivefunction find_cable_index_by_idfunction get_extcon_typefunction is_extcon_attachedfunction is_extcon_changedfunction is_extcon_property_supportedfunction is_extcon_property_capabilityfunction init_propertyfunction state_showfunction name_showfunction cable_name_showfunction cable_state_showfunction extcon_syncfunction extcon_get_statefunction extcon_set_statefunction extcon_set_state_syncfunction extcon_get_propertyfunction extcon_set_propertyfunction extcon_set_property_syncfunction extcon_get_property_capabilityfunction extcon_set_property_capabilityfunction extcon_get_extcon_devfunction extcon_register_notifierfunction extcon_unregister_notifierfunction extcon_register_notifier_allfunction extcon_unregister_notifier_allfunction create_extcon_classfunction extcon_dev_releasefunction dummy_sysfs_dev_releasefunction extcon_dev_freefunction extcon_alloc_cablesfunction extcon_alloc_muexfunction extcon_alloc_groupsfunction extcon_dev_registerfunction extcon_dev_unregisterfunction ERR_PTRfunction ERR_PTRfunction extcon_get_edev_namefunction extcon_class_initfunction extcon_class_exitmodule init extcon_class_initexport extcon_syncexport extcon_get_stateexport extcon_set_stateexport extcon_set_state_syncexport extcon_get_propertyexport extcon_set_property
Annotated Snippet
module_init(extcon_class_init);
static void __exit extcon_class_exit(void)
{
class_destroy(extcon_class);
}
module_exit(extcon_class_exit);
MODULE_AUTHOR("Chanwoo Choi <cw00.choi@samsung.com>");
MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
MODULE_DESCRIPTION("External Connector (extcon) framework");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/module.h`, `linux/types.h`, `linux/idr.h`, `linux/init.h`, `linux/device.h`, `linux/fs.h`, `linux/err.h`, `linux/of.h`.
- Detected declarations: `struct extcon_cable`, `function check_mutually_exclusive`, `function find_cable_index_by_id`, `function get_extcon_type`, `function is_extcon_attached`, `function is_extcon_changed`, `function is_extcon_property_supported`, `function is_extcon_property_capability`, `function init_property`, `function state_show`.
- Atlas domain: Driver Families / drivers/extcon.
- 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.