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.
- 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/err.hlinux/gpio/driver.hlinux/slab.hlinux/module.hlinux/of.hlinux/ioport.hlinux/io.hlinux/device.hlinux/platform_device.hlinux/property.hpinctrl-lantiq.hlantiq_soc.h
Detected Declarations
struct pinctrl_xway_socenum xway_muxfunction xway_pinconf_getfunction xway_pinconf_setfunction xway_pinconf_group_setfunction xway_mux_applyfunction xway_gpio_setfunction xway_gpio_getfunction xway_gpio_dir_infunction xway_gpio_dir_outfunction IRQfunction pinmux_xway_probefunction gpiochip_add_pin_rangefunction pinmux_xway_init
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
- Immediate include surface: `linux/err.h`, `linux/gpio/driver.h`, `linux/slab.h`, `linux/module.h`, `linux/of.h`, `linux/ioport.h`, `linux/io.h`, `linux/device.h`.
- Detected declarations: `struct pinctrl_xway_soc`, `enum xway_mux`, `function xway_pinconf_get`, `function xway_pinconf_set`, `function xway_pinconf_group_set`, `function xway_mux_apply`, `function xway_gpio_set`, `function xway_gpio_get`, `function xway_gpio_dir_in`, `function xway_gpio_dir_out`.
- Atlas domain: Driver Families / drivers/pinctrl.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.