drivers/media/test-drivers/vimc/vimc-common.c
Source file repositories/reference/linux-study-clean/drivers/media/test-drivers/vimc/vimc-common.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/test-drivers/vimc/vimc-common.c- Extension
.c- Size
- 9901 bytes
- Lines
- 424
- Domain
- Driver Families
- Bucket
- drivers/media
- 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/init.hlinux/module.hmedia/v4l2-ctrls.hvimc-common.h
Detected Declarations
function vimc_is_sourcefunction vimc_mbus_code_by_indexfunction vimc_get_pix_formatfunction vimc_vdev_link_validatefunction vimc_ent_sd_register
Annotated Snippet
if (ret) {
dev_err(v4l2_dev->dev,
"%s: subdev initialization failed (err=%d)\n",
name, ret);
goto err_clean_m_ent;
}
}
/* Register the subdev with the v4l2 and the media framework */
ret = v4l2_device_register_subdev(v4l2_dev, sd);
if (ret) {
dev_err(v4l2_dev->dev,
"%s: subdev register failed (err=%d)\n",
name, ret);
goto err_clean_sd;
}
return 0;
err_clean_sd:
v4l2_subdev_cleanup(sd);
err_clean_m_ent:
media_entity_cleanup(&sd->entity);
return ret;
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `media/v4l2-ctrls.h`, `vimc-common.h`.
- Detected declarations: `function vimc_is_source`, `function vimc_mbus_code_by_index`, `function vimc_get_pix_format`, `function vimc_vdev_link_validate`, `function vimc_ent_sd_register`.
- Atlas domain: Driver Families / drivers/media.
- 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.