drivers/i2c/busses/i2c-viperboard.c
Source file repositories/reference/linux-study-clean/drivers/i2c/busses/i2c-viperboard.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/i2c/busses/i2c-viperboard.c- Extension
.c- Size
- 11941 bytes
- Lines
- 463
- Domain
- Driver Families
- Bucket
- drivers/i2c
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/errno.hlinux/module.hlinux/slab.hlinux/string_choices.hlinux/types.hlinux/mutex.hlinux/platform_device.hlinux/usb.hlinux/i2c.hlinux/mfd/viperboard.h
Detected Declarations
struct vprbrd_i2cfunction vprbrd_i2c_statusfunction vprbrd_i2c_receivefunction vprbrd_i2c_addrfunction vprbrd_i2c_readfunction vprbrd_i2c_writefunction vprbrd_i2c_xferfunction vprbrd_i2c_funcfunction vprbrd_i2c_probefunction vprbrd_i2c_removefunction vprbrd_i2c_initfunction vprbrd_i2c_exitmodule init vprbrd_i2c_init
Annotated Snippet
subsys_initcall(vprbrd_i2c_init);
static void __exit vprbrd_i2c_exit(void)
{
platform_driver_unregister(&vprbrd_i2c_driver);
}
module_exit(vprbrd_i2c_exit);
MODULE_AUTHOR("Lars Poeschel <poeschel@lemonage.de>");
MODULE_DESCRIPTION("I2C controller driver for Nano River Techs Viperboard");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:viperboard-i2c");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/errno.h`, `linux/module.h`, `linux/slab.h`, `linux/string_choices.h`, `linux/types.h`, `linux/mutex.h`, `linux/platform_device.h`.
- Detected declarations: `struct vprbrd_i2c`, `function vprbrd_i2c_status`, `function vprbrd_i2c_receive`, `function vprbrd_i2c_addr`, `function vprbrd_i2c_read`, `function vprbrd_i2c_write`, `function vprbrd_i2c_xfer`, `function vprbrd_i2c_func`, `function vprbrd_i2c_probe`, `function vprbrd_i2c_remove`.
- Atlas domain: Driver Families / drivers/i2c.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.