drivers/mux/adgs1408.c
Source file repositories/reference/linux-study-clean/drivers/mux/adgs1408.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mux/adgs1408.c- Extension
.c- Size
- 2949 bytes
- Lines
- 130
- 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/mod_devicetable.hlinux/module.hlinux/mux/driver.hlinux/property.hlinux/spi/spi.h
Detected Declarations
enum adgs1408_chip_idfunction adgs1408_spi_reg_writefunction adgs1408_setfunction adgs1408_probe
Annotated Snippet
if (idle_state < mux->states) {
mux->idle_state = idle_state;
break;
}
fallthrough;
default:
dev_err(dev, "invalid idle-state %d\n", idle_state);
return -EINVAL;
}
return devm_mux_chip_register(dev, mux_chip);
}
static const struct spi_device_id adgs1408_spi_id[] = {
{ "adgs1408", ADGS1408 },
{ "adgs1409", ADGS1409 },
{ }
};
MODULE_DEVICE_TABLE(spi, adgs1408_spi_id);
static const struct of_device_id adgs1408_of_match[] = {
{ .compatible = "adi,adgs1408", .data = (void *)ADGS1408, },
{ .compatible = "adi,adgs1409", .data = (void *)ADGS1409, },
{ }
};
MODULE_DEVICE_TABLE(of, adgs1408_of_match);
static struct spi_driver adgs1408_driver = {
.driver = {
.name = "adgs1408",
.of_match_table = adgs1408_of_match,
},
.probe = adgs1408_probe,
.id_table = adgs1408_spi_id,
};
module_spi_driver(adgs1408_driver);
MODULE_AUTHOR("Mircea Caprioru <mircea.caprioru@analog.com>");
MODULE_DESCRIPTION("Analog Devices ADGS1408 MUX driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/err.h`, `linux/mod_devicetable.h`, `linux/module.h`, `linux/mux/driver.h`, `linux/property.h`, `linux/spi/spi.h`.
- Detected declarations: `enum adgs1408_chip_id`, `function adgs1408_spi_reg_write`, `function adgs1408_set`, `function adgs1408_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.