drivers/extcon/extcon-sm5502.c
Source file repositories/reference/linux-study-clean/drivers/extcon/extcon-sm5502.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/extcon/extcon-sm5502.c- Extension
.c- Size
- 24162 bytes
- Lines
- 856
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/err.hlinux/i2c.hlinux/interrupt.hlinux/irqdomain.hlinux/kernel.hlinux/module.hlinux/platform_device.hlinux/regmap.hlinux/slab.hlinux/extcon-provider.hextcon-sm5502.h
Detected Declarations
struct muic_irqstruct reg_datastruct sm5502_muic_infostruct sm5502_typeenum sm5502_muic_acc_typefunction sm5502_muic_volatile_regfunction sm5502_muic_set_pathfunction sm5502_muic_get_cable_typefunction sm5502_muic_cable_handlerfunction sm5502_muic_irq_workfunction sm5502_parse_irqfunction sm5504_parse_irqfunction sm5502_muic_irq_handlerfunction sm5502_muic_detect_cable_wqfunction sm5502_init_dev_typefunction sm5022_muic_i2c_probefunction sm5502_muic_suspendfunction sm5502_muic_resumefunction sm5502_muic_i2c_initmodule init sm5502_muic_i2c_init
Annotated Snippet
subsys_initcall(sm5502_muic_i2c_init);
MODULE_DESCRIPTION("Silicon Mitus SM5502 Extcon driver");
MODULE_AUTHOR("Chanwoo Choi <cw00.choi@samsung.com>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/err.h`, `linux/i2c.h`, `linux/interrupt.h`, `linux/irqdomain.h`, `linux/kernel.h`, `linux/module.h`, `linux/platform_device.h`, `linux/regmap.h`.
- Detected declarations: `struct muic_irq`, `struct reg_data`, `struct sm5502_muic_info`, `struct sm5502_type`, `enum sm5502_muic_acc_type`, `function sm5502_muic_volatile_reg`, `function sm5502_muic_set_path`, `function sm5502_muic_get_cable_type`, `function sm5502_muic_cable_handler`, `function sm5502_muic_irq_work`.
- 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.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.