drivers/mux/adg792a.c
Source file repositories/reference/linux-study-clean/drivers/mux/adg792a.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mux/adg792a.c- Extension
.c- Size
- 3633 bytes
- Lines
- 154
- Domain
- Driver Families
- Bucket
- drivers/mux
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/err.hlinux/i2c.hlinux/module.hlinux/mux/driver.hlinux/property.h
Detected Declarations
function Copyrightfunction adg792a_setfunction adg792a_probe
Annotated Snippet
switch (idle_state[i]) {
case MUX_IDLE_DISCONNECT:
case MUX_IDLE_AS_IS:
case 0 ... 4:
mux->idle_state = idle_state[i];
break;
default:
dev_err(dev, "invalid idle-state %d\n", idle_state[i]);
return -EINVAL;
}
}
ret = devm_mux_chip_register(dev, mux_chip);
if (ret < 0)
return ret;
if (cells)
dev_info(dev, "3x single pole quadruple throw muxes registered\n");
else
dev_info(dev, "triple pole quadruple throw mux registered\n");
return 0;
}
static const struct i2c_device_id adg792a_id[] = {
{ .name = "adg792a", },
{ .name = "adg792g", },
{ }
};
MODULE_DEVICE_TABLE(i2c, adg792a_id);
static const struct of_device_id adg792a_of_match[] = {
{ .compatible = "adi,adg792a", },
{ .compatible = "adi,adg792g", },
{ }
};
MODULE_DEVICE_TABLE(of, adg792a_of_match);
static struct i2c_driver adg792a_driver = {
.driver = {
.name = "adg792a",
.of_match_table = adg792a_of_match,
},
.probe = adg792a_probe,
.id_table = adg792a_id,
};
module_i2c_driver(adg792a_driver);
MODULE_DESCRIPTION("Analog Devices ADG792A/G Triple 4:1 mux driver");
MODULE_AUTHOR("Peter Rosin <peda@axentia.se>");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/err.h`, `linux/i2c.h`, `linux/module.h`, `linux/mux/driver.h`, `linux/property.h`.
- Detected declarations: `function Copyright`, `function adg792a_set`, `function adg792a_probe`.
- Atlas domain: Driver Families / drivers/mux.
- Implementation status: source 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.