drivers/pinctrl/nuvoton/pinctrl-ma35.h

Source file repositories/reference/linux-study-clean/drivers/pinctrl/nuvoton/pinctrl-ma35.h

File Facts

System
Linux kernel
Corpus path
drivers/pinctrl/nuvoton/pinctrl-ma35.h
Extension
.h
Size
1180 bytes
Lines
53
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 ma35_mux_desc {
	const char *name;
	u32 muxval;
};

struct ma35_pin_data {
	u32 offset;
	u32 shift;
	struct ma35_mux_desc *muxes;
};

struct ma35_pinctrl_soc_info {
	const struct pinctrl_pin_desc *pins;
	unsigned int npins;
	int (*get_pin_num)(int offset, int shift);
};

#define MA35_PIN(num, n, o, s, ...) {			\
	.number = num,					\
	.name = #n,					\
	.drv_data = &(struct ma35_pin_data) {		\
		.offset = o,				\
		.shift = s,				\
		.muxes = (struct ma35_mux_desc[]) {	\
			 __VA_ARGS__, { } },		\
	},						\
}

#define MA35_MUX(_val, _name) {				\
	.name = _name,					\
	.muxval = _val,					\
}

int ma35_pinctrl_probe(struct platform_device *pdev, const struct ma35_pinctrl_soc_info *info);
int ma35_pinctrl_suspend(struct device *dev);
int ma35_pinctrl_resume(struct device *dev);

#endif /* __PINCTRL_MA35_H */

Annotation

Implementation Notes