drivers/pinctrl/bcm/pinctrl-bcm281xx.c

Source file repositories/reference/linux-study-clean/drivers/pinctrl/bcm/pinctrl-bcm281xx.c

File Facts

System
Linux kernel
Corpus path
drivers/pinctrl/bcm/pinctrl-bcm281xx.c
Extension
.c
Size
70682 bytes
Lines
2163
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 bcm281xx_pin_function {
	const char *name;
	const char * const *groups;
	const unsigned int ngroups;
};

/*
 * Device types (used in bcm281xx_pinctrl_desc to differentiate
 * the two device types from each other)
 */
enum bcm281xx_pinctrl_type {
	BCM281XX_PINCTRL_TYPE,
	BCM21664_PINCTRL_TYPE,
};

/*
 * bcm281xx_pinctrl_info - description of a pinctrl device supported
 * by this driver, intended to be used as a provider of OF match data.
 */
struct bcm281xx_pinctrl_info {
	enum bcm281xx_pinctrl_type device_type;

	/* List of all pins */
	const struct pinctrl_pin_desc *pins;
	unsigned int npins;

	const struct bcm281xx_pin_function *functions;
	unsigned int nfunctions;

	const struct regmap_config *regmap_config;
};

/*
 * bcm281xx_pinctrl_data - Broadcom-specific pinctrl data
 * @reg_base - base of pinctrl registers
 */
struct bcm281xx_pinctrl_data {
	struct device *dev;
	void __iomem *reg_base;

	struct regmap *regmap;
	const struct bcm281xx_pinctrl_info *info;
};

/*
 * Pin number definition.  The order here must be the same as defined in the
 * PADCTRLREG block in the RDB.
 */
#define BCM281XX_PIN_ADCSYNC		0
#define BCM281XX_PIN_BAT_RM		1
#define BCM281XX_PIN_BSC1_SCL		2
#define BCM281XX_PIN_BSC1_SDA		3
#define BCM281XX_PIN_BSC2_SCL		4
#define BCM281XX_PIN_BSC2_SDA		5
#define BCM281XX_PIN_CLASSGPWR		6
#define BCM281XX_PIN_CLK_CX8		7
#define BCM281XX_PIN_CLKOUT_0		8
#define BCM281XX_PIN_CLKOUT_1		9
#define BCM281XX_PIN_CLKOUT_2		10
#define BCM281XX_PIN_CLKOUT_3		11
#define BCM281XX_PIN_CLKREQ_IN_0	12
#define BCM281XX_PIN_CLKREQ_IN_1	13
#define BCM281XX_PIN_CWS_SYS_REQ1	14
#define BCM281XX_PIN_CWS_SYS_REQ2	15
#define BCM281XX_PIN_CWS_SYS_REQ3	16
#define BCM281XX_PIN_DIGMIC1_CLK	17
#define BCM281XX_PIN_DIGMIC1_DQ		18
#define BCM281XX_PIN_DIGMIC2_CLK	19
#define BCM281XX_PIN_DIGMIC2_DQ		20
#define BCM281XX_PIN_GPEN13		21
#define BCM281XX_PIN_GPEN14		22
#define BCM281XX_PIN_GPEN15		23
#define BCM281XX_PIN_GPIO00		24
#define BCM281XX_PIN_GPIO01		25
#define BCM281XX_PIN_GPIO02		26
#define BCM281XX_PIN_GPIO03		27
#define BCM281XX_PIN_GPIO04		28
#define BCM281XX_PIN_GPIO05		29
#define BCM281XX_PIN_GPIO06		30
#define BCM281XX_PIN_GPIO07		31
#define BCM281XX_PIN_GPIO08		32
#define BCM281XX_PIN_GPIO09		33
#define BCM281XX_PIN_GPIO10		34
#define BCM281XX_PIN_GPIO11		35
#define BCM281XX_PIN_GPIO12		36
#define BCM281XX_PIN_GPIO13		37
#define BCM281XX_PIN_GPIO14		38
#define BCM281XX_PIN_GPS_PABLANK	39
#define BCM281XX_PIN_GPS_TMARK		40
#define BCM281XX_PIN_HDMI_SCL		41

Annotation

Implementation Notes