drivers/pinctrl/visconti/pinctrl-common.h
Source file repositories/reference/linux-study-clean/drivers/pinctrl/visconti/pinctrl-common.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/visconti/pinctrl-common.h- Extension
.h- Size
- 2267 bytes
- Lines
- 97
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct pinctrl_pin_descstruct visconti_desc_pinstruct visconti_muxstruct visconti_pin_groupstruct visconti_pin_functionstruct visconti_pinctrl_devdata
Annotated Snippet
struct visconti_desc_pin {
struct pinctrl_pin_desc pin;
unsigned int dsel_offset;
unsigned int dsel_shift;
unsigned int pude_offset;
unsigned int pudsel_offset;
unsigned int pud_shift;
};
#define VISCONTI_PIN(_pin, dsel, d_sh, pude, pudsel, p_sh) \
{ \
.pin = _pin, \
.dsel_offset = dsel, \
.dsel_shift = d_sh, \
.pude_offset = pude, \
.pudsel_offset = pudsel, \
.pud_shift = p_sh, \
}
/* Group */
#define VISCONTI_GROUPS(groups_name, ...) \
static const char * const groups_name ## _grps[] = { __VA_ARGS__ }
struct visconti_mux {
unsigned int offset;
unsigned int mask;
unsigned int val;
};
struct visconti_pin_group {
const char *name;
const unsigned int *pins;
unsigned int nr_pins;
struct visconti_mux mux;
};
#define VISCONTI_PIN_GROUP(group_name, off, msk, v) \
{ \
.name = __stringify(group_name) "_grp", \
.pins = group_name ## _pins, \
.nr_pins = ARRAY_SIZE(group_name ## _pins), \
.mux = { \
.offset = off, \
.mask = msk, \
.val = v, \
} \
}
/* MUX */
struct visconti_pin_function {
const char *name;
const char * const *groups;
unsigned int nr_groups;
};
#define VISCONTI_PIN_FUNCTION(func) \
{ \
.name = #func, \
.groups = func ## _grps, \
.nr_groups = ARRAY_SIZE(func ## _grps), \
}
/* chip dependent data */
struct visconti_pinctrl_devdata {
const struct visconti_desc_pin *pins;
unsigned int nr_pins;
const struct visconti_pin_group *groups;
unsigned int nr_groups;
const struct visconti_pin_function *functions;
unsigned int nr_functions;
const struct visconti_mux *gpio_mux;
void (*unlock)(void __iomem *base);
};
int visconti_pinctrl_probe(struct platform_device *pdev,
const struct visconti_pinctrl_devdata *devdata);
#endif /* __VISCONTI_PINCTRL_COMMON_H__ */
Annotation
- Detected declarations: `struct pinctrl_pin_desc`, `struct visconti_desc_pin`, `struct visconti_mux`, `struct visconti_pin_group`, `struct visconti_pin_function`, `struct visconti_pinctrl_devdata`.
- 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.