drivers/interconnect/bulk.c
Source file repositories/reference/linux-study-clean/drivers/interconnect/bulk.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/interconnect/bulk.c- Extension
.c- Size
- 3786 bytes
- Lines
- 160
- Domain
- Driver Families
- Bucket
- drivers/interconnect
- 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/interconnect-provider.hlinux/device.hlinux/export.h
Detected Declarations
struct icc_bulk_devresfunction of_icc_bulk_getfunction icc_bulk_putfunction icc_bulk_set_bwfunction icc_bulk_enablefunction icc_bulk_disablefunction devm_icc_bulk_releasefunction devm_of_icc_bulk_getexport of_icc_bulk_getexport icc_bulk_putexport icc_bulk_set_bwexport icc_bulk_enableexport icc_bulk_disableexport devm_of_icc_bulk_get
Annotated Snippet
struct icc_bulk_devres {
struct icc_bulk_data *paths;
int num_paths;
};
static void devm_icc_bulk_release(struct device *dev, void *res)
{
struct icc_bulk_devres *devres = res;
icc_bulk_put(devres->num_paths, devres->paths);
}
/**
* devm_of_icc_bulk_get() - resource managed of_icc_bulk_get
* @dev: the device requesting the path
* @num_paths: the number of icc_bulk_data
* @paths: the table with the paths we want to get
*
* Returns 0 on success or negative errno otherwise.
*/
int devm_of_icc_bulk_get(struct device *dev, int num_paths, struct icc_bulk_data *paths)
{
struct icc_bulk_devres *devres;
int ret;
devres = devres_alloc(devm_icc_bulk_release, sizeof(*devres), GFP_KERNEL);
if (!devres)
return -ENOMEM;
ret = of_icc_bulk_get(dev, num_paths, paths);
if (!ret) {
devres->paths = paths;
devres->num_paths = num_paths;
devres_add(dev, devres);
} else {
devres_free(devres);
}
return ret;
}
EXPORT_SYMBOL_GPL(devm_of_icc_bulk_get);
Annotation
- Immediate include surface: `linux/interconnect-provider.h`, `linux/device.h`, `linux/export.h`.
- Detected declarations: `struct icc_bulk_devres`, `function of_icc_bulk_get`, `function icc_bulk_put`, `function icc_bulk_set_bw`, `function icc_bulk_enable`, `function icc_bulk_disable`, `function devm_icc_bulk_release`, `function devm_of_icc_bulk_get`, `export of_icc_bulk_get`, `export icc_bulk_put`.
- Atlas domain: Driver Families / drivers/interconnect.
- 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.