drivers/pinctrl/meson/pinctrl-meson-axg-pmx.h

Source file repositories/reference/linux-study-clean/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.h

File Facts

System
Linux kernel
Corpus path
drivers/pinctrl/meson/pinctrl-meson-axg-pmx.h
Extension
.h
Size
1295 bytes
Lines
63
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct meson_pmx_bank {
	const char *name;
	unsigned int first;
	unsigned int last;
	unsigned int reg;
	unsigned int offset;
};

struct meson_axg_pmx_data {
	const struct meson_pmx_bank *pmx_banks;
	unsigned int num_pmx_banks;
};

#define BANK_PMX(n, f, l, r, o)				\
	{							\
		.name   = n,					\
		.first	= f,					\
		.last	= l,					\
		.reg	= r,					\
		.offset = o,					\
	}

struct meson_pmx_axg_data {
        unsigned int func;
};

#define PMX_DATA(f)							\
	{								\
		.func = f,						\
	}

#define GROUP(grp, f)							\
	{								\
		.name = #grp,						\
		.pins = grp ## _pins,                                   \
		.num_pins = ARRAY_SIZE(grp ## _pins),			\
		.data = (const struct meson_pmx_axg_data[]){		\
			PMX_DATA(f),					\
		},							\
	}

#define GPIO_GROUP(gpio)						\
	{								\
		.name = #gpio,						\
		.pins = (const unsigned int[]){ gpio },			\
		.num_pins = 1,						\
		.data = (const struct meson_pmx_axg_data[]){		\
			PMX_DATA(0),					\
		},							\
	}

extern const struct pinmux_ops meson_axg_pmx_ops;

Annotation

Implementation Notes