drivers/extcon/extcon-sm5502.h
Source file repositories/reference/linux-study-clean/drivers/extcon/extcon-sm5502.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/extcon/extcon-sm5502.h- Extension
.h- Size
- 14194 bytes
- Lines
- 355
- Domain
- Driver Families
- Bucket
- drivers/extcon
- 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.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
enum sm5502_regenum sm5502_irqenum sm5504_irq
Annotated Snippet
#ifndef __LINUX_EXTCON_SM5502_H
#define __LINUX_EXTCON_SM5502_H
/* SM5502 registers */
enum sm5502_reg {
SM5502_REG_DEVICE_ID = 0x01,
SM5502_REG_CONTROL,
SM5502_REG_INT1,
SM5502_REG_INT2,
SM5502_REG_INTMASK1,
SM5502_REG_INTMASK2,
SM5502_REG_ADC,
SM5502_REG_TIMING_SET1,
SM5502_REG_TIMING_SET2,
SM5502_REG_DEV_TYPE1,
SM5502_REG_DEV_TYPE2,
SM5502_REG_BUTTON1,
SM5502_REG_BUTTON2,
SM5502_REG_CAR_KIT_STATUS,
SM5502_REG_RSVD1,
SM5502_REG_RSVD2,
SM5502_REG_RSVD3,
SM5502_REG_RSVD4,
SM5502_REG_MANUAL_SW1,
SM5502_REG_MANUAL_SW2,
SM5502_REG_DEV_TYPE3,
SM5502_REG_RSVD5,
SM5502_REG_RSVD6,
SM5502_REG_RSVD7,
SM5502_REG_RSVD8,
SM5502_REG_RSVD9,
SM5502_REG_RESET,
SM5502_REG_RSVD10,
SM5502_REG_RESERVED_ID1,
SM5502_REG_RSVD11,
SM5502_REG_RSVD12,
SM5502_REG_RESERVED_ID2,
SM5502_REG_RSVD13,
SM5502_REG_OCP,
SM5502_REG_RSVD14,
SM5502_REG_RSVD15,
SM5502_REG_RSVD16,
SM5502_REG_RSVD17,
SM5502_REG_RSVD18,
SM5502_REG_RSVD19,
SM5502_REG_RSVD20,
SM5502_REG_RSVD21,
SM5502_REG_RSVD22,
SM5502_REG_RSVD23,
SM5502_REG_RSVD24,
SM5502_REG_RSVD25,
SM5502_REG_RSVD26,
SM5502_REG_RSVD27,
SM5502_REG_RSVD28,
SM5502_REG_RSVD29,
SM5502_REG_RSVD30,
SM5502_REG_RSVD31,
SM5502_REG_RSVD32,
SM5502_REG_RSVD33,
SM5502_REG_RSVD34,
SM5502_REG_RSVD35,
SM5502_REG_RSVD36,
SM5502_REG_RESERVED_ID3,
SM5502_REG_END,
};
/* Define SM5502 MASK/SHIFT constant */
#define SM5502_REG_DEVICE_ID_VENDOR_SHIFT 0
#define SM5502_REG_DEVICE_ID_VERSION_SHIFT 3
#define SM5502_REG_DEVICE_ID_VENDOR_MASK (0x3 << SM5502_REG_DEVICE_ID_VENDOR_SHIFT)
#define SM5502_REG_DEVICE_ID_VERSION_MASK (0x1f << SM5502_REG_DEVICE_ID_VERSION_SHIFT)
#define SM5502_REG_CONTROL_MASK_INT_SHIFT 0
#define SM5502_REG_CONTROL_WAIT_SHIFT 1
#define SM5502_REG_CONTROL_MANUAL_SW_SHIFT 2
#define SM5502_REG_CONTROL_RAW_DATA_SHIFT 3
#define SM5502_REG_CONTROL_SW_OPEN_SHIFT 4
#define SM5502_REG_CONTROL_MASK_INT_MASK (0x1 << SM5502_REG_CONTROL_MASK_INT_SHIFT)
#define SM5502_REG_CONTROL_WAIT_MASK (0x1 << SM5502_REG_CONTROL_WAIT_SHIFT)
#define SM5502_REG_CONTROL_MANUAL_SW_MASK (0x1 << SM5502_REG_CONTROL_MANUAL_SW_SHIFT)
#define SM5502_REG_CONTROL_RAW_DATA_MASK (0x1 << SM5502_REG_CONTROL_RAW_DATA_SHIFT)
#define SM5502_REG_CONTROL_SW_OPEN_MASK (0x1 << SM5502_REG_CONTROL_SW_OPEN_SHIFT)
#define SM5504_REG_CONTROL_CHGTYP_SHIFT 5
#define SM5504_REG_CONTROL_USBCHDEN_SHIFT 6
#define SM5504_REG_CONTROL_ADC_EN_SHIFT 7
#define SM5504_REG_CONTROL_CHGTYP_MASK (0x1 << SM5504_REG_CONTROL_CHGTYP_SHIFT)
#define SM5504_REG_CONTROL_USBCHDEN_MASK (0x1 << SM5504_REG_CONTROL_USBCHDEN_SHIFT)
#define SM5504_REG_CONTROL_ADC_EN_MASK (0x1 << SM5504_REG_CONTROL_ADC_EN_SHIFT)
Annotation
- Detected declarations: `enum sm5502_reg`, `enum sm5502_irq`, `enum sm5504_irq`.
- Atlas domain: Driver Families / drivers/extcon.
- 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.