drivers/pinctrl/meson/pinctrl-meson.h
Source file repositories/reference/linux-study-clean/drivers/pinctrl/meson/pinctrl-meson.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/meson/pinctrl-meson.h- Extension
.h- Size
- 4730 bytes
- Lines
- 184
- 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.hlinux/pinctrl/pinctrl.hlinux/platform_device.hlinux/regmap.hlinux/types.hlinux/module.h
Detected Declarations
struct fwnode_handlestruct meson_pinctrlstruct meson_pmx_groupstruct meson_pmx_funcstruct meson_reg_descstruct meson_bankstruct meson_pinctrl_datastruct meson_pinctrlenum meson_reg_typeenum meson_pinconf_drv
Annotated Snippet
struct meson_pmx_group {
const char *name;
const unsigned int *pins;
unsigned int num_pins;
const void *data;
};
/**
* struct meson_pmx_func - a pinmux function
*
* @name: function name
* @groups: groups in the function
* @num_groups: number of groups in the function
*/
struct meson_pmx_func {
const char *name;
const char * const *groups;
unsigned int num_groups;
};
/**
* struct meson_reg_desc - a register descriptor
*
* @reg: register offset in the regmap
* @bit: bit index in register
*
* The structure describes the information needed to control pull,
* pull-enable, direction, etc. for a single pin
*/
struct meson_reg_desc {
unsigned int reg;
unsigned int bit;
};
/**
* enum meson_reg_type - type of registers encoded in @meson_reg_desc
*/
enum meson_reg_type {
MESON_REG_PULLEN,
MESON_REG_PULL,
MESON_REG_DIR,
MESON_REG_OUT,
MESON_REG_IN,
MESON_REG_DS,
MESON_NUM_REG,
};
/**
* enum meson_pinconf_drv - value of drive-strength supported
*/
enum meson_pinconf_drv {
MESON_PINCONF_DRV_500UA,
MESON_PINCONF_DRV_2500UA,
MESON_PINCONF_DRV_3000UA,
MESON_PINCONF_DRV_4000UA,
};
/**
* struct meson bank
*
* @name: bank name
* @first: first pin of the bank
* @last: last pin of the bank
* @irq: hwirq base number of the bank
* @regs: array of register descriptors
*
* A bank represents a set of pins controlled by a contiguous set of
* bits in the domain registers. The structure specifies which bits in
* the regmap control the different functionalities. Each member of
* the @regs array refers to the first pin of the bank.
*/
struct meson_bank {
const char *name;
unsigned int first;
unsigned int last;
int irq_first;
int irq_last;
struct meson_reg_desc regs[MESON_NUM_REG];
};
struct meson_pinctrl_data {
const char *name;
const struct pinctrl_pin_desc *pins;
const struct meson_pmx_group *groups;
const struct meson_pmx_func *funcs;
unsigned int num_pins;
unsigned int num_groups;
unsigned int num_funcs;
const struct meson_bank *banks;
unsigned int num_banks;
Annotation
- Immediate include surface: `linux/gpio/driver.h`, `linux/pinctrl/pinctrl.h`, `linux/platform_device.h`, `linux/regmap.h`, `linux/types.h`, `linux/module.h`.
- Detected declarations: `struct fwnode_handle`, `struct meson_pinctrl`, `struct meson_pmx_group`, `struct meson_pmx_func`, `struct meson_reg_desc`, `struct meson_bank`, `struct meson_pinctrl_data`, `struct meson_pinctrl`, `enum meson_reg_type`, `enum meson_pinconf_drv`.
- 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.