drivers/pinctrl/pinctrl-xway.c

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

File Facts

System
Linux kernel
Corpus path
drivers/pinctrl/pinctrl-xway.c
Extension
.c
Size
56938 bytes
Lines
1552
Domain
Driver Families
Bucket
drivers/pinctrl
Inferred role
Driver Families: exported/initcall integration point
Status
integration 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 pinctrl_xway_soc {
	int pin_count;
	const struct ltq_mfp_pin *mfp;
	const struct ltq_pin_group *grps;
	unsigned int num_grps;
	const struct ltq_pmx_func *funcs;
	unsigned int num_funcs;
	const unsigned *exin;
	unsigned int num_exin;
};

/* XWAY AMAZON Family */
static struct pinctrl_xway_soc ase_pinctrl = {
	.pin_count = ASE_MAX_PIN,
	.mfp = ase_mfp,
	.grps = ase_grps,
	.num_grps = ARRAY_SIZE(ase_grps),
	.funcs = ase_funcs,
	.num_funcs = ARRAY_SIZE(ase_funcs),
	.exin = ase_exin_pin_map,
	.num_exin = 3
};

/* XWAY DANUBE Family */
static struct pinctrl_xway_soc danube_pinctrl = {
	.pin_count = DANUBE_MAX_PIN,
	.mfp = danube_mfp,
	.grps = danube_grps,
	.num_grps = ARRAY_SIZE(danube_grps),
	.funcs = danube_funcs,
	.num_funcs = ARRAY_SIZE(danube_funcs),
	.exin = danube_exin_pin_map,
	.num_exin = 3
};

/* XWAY xRX100 Family */
static struct pinctrl_xway_soc xrx100_pinctrl = {
	.pin_count = XRX100_MAX_PIN,
	.mfp = xrx100_mfp,
	.grps = xrx100_grps,
	.num_grps = ARRAY_SIZE(xrx100_grps),
	.funcs = xrx100_funcs,
	.num_funcs = ARRAY_SIZE(xrx100_funcs),
	.exin = xrx100_exin_pin_map,
	.num_exin = 6
};

/* XWAY xRX200 Family */
static struct pinctrl_xway_soc xrx200_pinctrl = {
	.pin_count = XRX200_MAX_PIN,
	.mfp = xrx200_mfp,
	.grps = xrx200_grps,
	.num_grps = ARRAY_SIZE(xrx200_grps),
	.funcs = xrx200_funcs,
	.num_funcs = ARRAY_SIZE(xrx200_funcs),
	.exin = xrx200_exin_pin_map,
	.num_exin = 6
};

/* XWAY xRX300 Family */
static struct pinctrl_xway_soc xrx300_pinctrl = {
	.pin_count = XRX300_MAX_PIN,
	.mfp = xrx300_mfp,
	.grps = xrx300_grps,
	.num_grps = ARRAY_SIZE(xrx300_grps),
	.funcs = xrx300_funcs,
	.num_funcs = ARRAY_SIZE(xrx300_funcs),
	.exin = xrx300_exin_pin_map,
	.num_exin = 5
};

static struct pinctrl_gpio_range xway_gpio_range = {
	.name	= "XWAY GPIO",
	.gc	= &xway_chip,
};

static const struct of_device_id xway_match[] = {
	{ .compatible = "lantiq,ase-pinctrl", .data = &ase_pinctrl},
	{ .compatible = "lantiq,danube-pinctrl", .data = &danube_pinctrl},
	{ .compatible = "lantiq,xrx100-pinctrl", .data = &xrx100_pinctrl},
	{ .compatible = "lantiq,xrx200-pinctrl", .data = &xrx200_pinctrl},
	{ .compatible = "lantiq,xrx300-pinctrl", .data = &xrx300_pinctrl},
	{},
};
MODULE_DEVICE_TABLE(of, xway_match);

static int pinmux_xway_probe(struct platform_device *pdev)
{
	const struct pinctrl_xway_soc *xway_soc;
	int ret, i;

Annotation

Implementation Notes