drivers/pinctrl/mediatek/mtk-eint.h
Source file repositories/reference/linux-study-clean/drivers/pinctrl/mediatek/mtk-eint.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/mediatek/mtk-eint.h- Extension
.h- Size
- 2896 bytes
- Lines
- 128
- Domain
- Driver Families
- Bucket
- drivers/pinctrl
- 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/irqdomain.h
Detected Declarations
struct mtk_eint_regsstruct mtk_eint_hwstruct mtk_eint_pinstruct mtk_eintstruct mtk_eint_xtstruct mtk_eintfunction mtk_eint_do_initfunction mtk_eint_do_suspendfunction mtk_eint_do_resumefunction mtk_eint_set_debouncefunction mtk_eint_find_irq
Annotated Snippet
struct mtk_eint_regs {
unsigned int stat;
unsigned int ack;
unsigned int mask;
unsigned int mask_set;
unsigned int mask_clr;
unsigned int sens;
unsigned int sens_set;
unsigned int sens_clr;
unsigned int soft;
unsigned int soft_set;
unsigned int soft_clr;
unsigned int pol;
unsigned int pol_set;
unsigned int pol_clr;
unsigned int dom_en;
unsigned int dbnc_ctrl;
unsigned int dbnc_set;
unsigned int dbnc_clr;
};
struct mtk_eint_hw {
u8 port_mask;
u8 ports;
unsigned int ap_num;
unsigned int db_cnt;
const unsigned int *db_time;
};
struct mtk_eint_pin {
u16 number;
u8 instance;
u8 index;
bool debounce;
bool dual_edge;
};
extern const unsigned int debounce_time_mt2701[];
extern const unsigned int debounce_time_mt6765[];
extern const unsigned int debounce_time_mt6795[];
extern const unsigned int debounce_time_mt6878[];
struct mtk_eint;
struct mtk_eint_xt {
int (*get_gpio_n)(void *data, unsigned long eint_n,
unsigned int *gpio_n,
struct gpio_chip **gpio_chip);
int (*get_gpio_state)(void *data, unsigned long eint_n);
int (*set_gpio_as_eint)(void *data, unsigned long eint_n);
};
struct mtk_eint {
struct device *dev;
void __iomem **base;
int nbase;
u16 *base_pin_num;
struct irq_domain *domain;
int irq;
int *dual_edge;
u16 **pin_list;
u32 **wake_mask;
u32 **cur_mask;
/* Used to fit into various EINT device */
const struct mtk_eint_hw *hw;
const struct mtk_eint_regs *regs;
struct mtk_eint_pin *pins;
u16 num_db_time;
/* Used to fit into various pinctrl device */
void *pctl;
const struct mtk_eint_xt *gpio_xlate;
};
#if IS_ENABLED(CONFIG_EINT_MTK)
int mtk_eint_do_init(struct mtk_eint *eint, struct mtk_eint_pin *eint_pin);
int mtk_eint_do_suspend(struct mtk_eint *eint);
int mtk_eint_do_resume(struct mtk_eint *eint);
int mtk_eint_set_debounce(struct mtk_eint *eint, unsigned long eint_n,
unsigned int debounce);
int mtk_eint_find_irq(struct mtk_eint *eint, unsigned long eint_n);
#else
static inline int mtk_eint_do_init(struct mtk_eint *eint,
struct mtk_eint_pin *eint_pin)
{
return -EOPNOTSUPP;
}
Annotation
- Immediate include surface: `linux/irqdomain.h`.
- Detected declarations: `struct mtk_eint_regs`, `struct mtk_eint_hw`, `struct mtk_eint_pin`, `struct mtk_eint`, `struct mtk_eint_xt`, `struct mtk_eint`, `function mtk_eint_do_init`, `function mtk_eint_do_suspend`, `function mtk_eint_do_resume`, `function mtk_eint_set_debounce`.
- Atlas domain: Driver Families / drivers/pinctrl.
- 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.