drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
Source file repositories/reference/linux-study-clean/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h- Extension
.h- Size
- 11507 bytes
- Lines
- 375
- 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/gpio/driver.h
Detected Declarations
struct mtk_pin_fieldstruct mtk_pin_field_calcstruct mtk_pin_rselstruct mtk_pin_reg_calcstruct mtk_func_descstruct mtk_eint_descstruct mtk_pin_descstruct mtk_pinctrl_groupstruct mtk_pinctrlstruct mtk_pin_socstruct mtk_pinctrlfunction Copyright
Annotated Snippet
struct mtk_pin_field {
u8 index;
u32 offset;
u32 mask;
u8 bitpos;
u8 next;
};
/* struct mtk_pin_field_calc - the structure that holds the range providing
* the guide used to look up the relevant field
* @s_pin: the start pin within the range
* @e_pin: the end pin within the range
* @i_base: the index pointing to the entry in base address list
* @s_addr: the start address for the range
* @x_addrs: the address distance between two consecutive registers
* within the range
* @s_bit: the start bit for the first register within the range
* @x_bits: the bit distance between two consecutive pins within
* the range
* @sz_reg: the size of bits in a register
* @fixed: the consecutive pins share the same bits with the 1st
* pin
*/
struct mtk_pin_field_calc {
u16 s_pin;
u16 e_pin;
u8 i_base;
u32 s_addr;
u8 x_addrs;
u8 s_bit;
u8 x_bits;
u8 sz_reg;
u8 fixed;
};
/**
* struct mtk_pin_rsel - the structure that provides bias resistance selection.
* @s_pin: the start pin within the rsel range
* @e_pin: the end pin within the rsel range
* @rsel_index: the rsel bias resistance index
* @up_rsel: the pullup rsel bias resistance value
* @down_rsel: the pulldown rsel bias resistance value
*/
struct mtk_pin_rsel {
u16 s_pin;
u16 e_pin;
u16 rsel_index;
u32 up_rsel;
u32 down_rsel;
};
/* struct mtk_pin_reg_calc - the structure that holds all ranges used to
* determine which register the pin would make use of
* for certain pin attribute.
* @range: the start address for the range
* @nranges: the number of items in the range
*/
struct mtk_pin_reg_calc {
const struct mtk_pin_field_calc *range;
unsigned int nranges;
};
/**
* struct mtk_func_desc - the structure that providing information
* all the funcs for this pin
* @name: the name of function
* @muxval: the mux to the function
*/
struct mtk_func_desc {
const char *name;
u8 muxval;
};
/**
* struct mtk_eint_desc - the structure that providing information
* for eint data per pin
* @eint_m: the eint mux for this pin
* @eitn_n: the eint number for this pin
*/
struct mtk_eint_desc {
u16 eint_m;
u16 eint_n;
};
/**
* struct mtk_pin_desc - the structure that providing information
* for each pin of chips
* @number: unique pin number from the global pin number space
* @name: name for this pin
* @eint: the eint data for this pin
Annotation
- Immediate include surface: `linux/gpio/driver.h`.
- Detected declarations: `struct mtk_pin_field`, `struct mtk_pin_field_calc`, `struct mtk_pin_rsel`, `struct mtk_pin_reg_calc`, `struct mtk_func_desc`, `struct mtk_eint_desc`, `struct mtk_pin_desc`, `struct mtk_pinctrl_group`, `struct mtk_pinctrl`, `struct mtk_pin_soc`.
- 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.