drivers/pinctrl/stm32/pinctrl-stm32.h

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

File Facts

System
Linux kernel
Corpus path
drivers/pinctrl/stm32/pinctrl-stm32.h
Extension
.h
Size
2121 bytes
Lines
91
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 stm32_desc_function {
	const char *name;
	const unsigned char num;
};

struct stm32_desc_pin {
	struct pinctrl_pin_desc pin;
	const struct stm32_desc_function functions[STM32_CONFIG_NUM];
	const unsigned int pkg;
};

#define STM32_PIN(_pin, ...)					\
	{							\
		.pin = _pin,					\
		.functions = {	\
			__VA_ARGS__},			\
	}

#define STM32_PIN_PKG(_pin, _pkg, ...)					\
	{							\
		.pin = _pin,					\
		.pkg  = _pkg,				\
		.functions = {	\
			__VA_ARGS__},			\
	}
#define STM32_FUNCTION(_num, _name)		\
	[_num] = {						\
		.num = _num,					\
		.name = _name,					\
	}

struct stm32_pinctrl_match_data {
	const struct stm32_desc_pin *pins;
	const unsigned int npins;
	bool secure_control;
	bool io_sync_control;
	bool rif_control;
};

/**
 * stm32_pctl_probe() - Common probe for stm32 pinctrl drivers.
 * @pdev: Pinctrl platform device.
 */
int stm32_pctl_probe(struct platform_device *pdev);

/**
 * stm32_pinctrl_suspend() - Common suspend for stm32 pinctrl drivers.
 * @dev: Pinctrl device.
 */
int stm32_pinctrl_suspend(struct device *dev);

/**
 * stm32_pinctrl_resume() - Common resume for stm32 pinctrl drivers.
 * @dev: Pinctrl device.
 */
int stm32_pinctrl_resume(struct device *dev);

#endif /* __PINCTRL_STM32_H */

Annotation

Implementation Notes