drivers/gpu/drm/bridge/aux-bridge.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/bridge/aux-bridge.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/bridge/aux-bridge.c- Extension
.c- Size
- 3807 bytes
- Lines
- 151
- Domain
- Driver Families
- Bucket
- drivers/gpu
- 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.
- 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/auxiliary_bus.hlinux/export.hlinux/module.hlinux/of.hdrm/drm_bridge.hdrm/bridge/aux-bridge.h
Detected Declarations
struct drm_aux_bridge_datafunction drm_aux_bridge_releasefunction drm_aux_bridge_unregister_adevfunction drm_aux_bridge_registerfunction drm_aux_bridge_attachfunction drm_aux_bridge_probeexport drm_aux_bridge_register
Annotated Snippet
struct drm_aux_bridge_data {
struct drm_bridge bridge;
struct drm_bridge *next_bridge;
struct device *dev;
};
static int drm_aux_bridge_attach(struct drm_bridge *bridge,
struct drm_encoder *encoder,
enum drm_bridge_attach_flags flags)
{
struct drm_aux_bridge_data *data;
if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR))
return -EINVAL;
data = container_of(bridge, struct drm_aux_bridge_data, bridge);
return drm_bridge_attach(encoder, data->next_bridge, bridge,
DRM_BRIDGE_ATTACH_NO_CONNECTOR);
}
static const struct drm_bridge_funcs drm_aux_bridge_funcs = {
.attach = drm_aux_bridge_attach,
};
static int drm_aux_bridge_probe(struct auxiliary_device *auxdev,
const struct auxiliary_device_id *id)
{
struct drm_aux_bridge_data *data;
data = devm_drm_bridge_alloc(&auxdev->dev, struct drm_aux_bridge_data,
bridge, &drm_aux_bridge_funcs);
if (IS_ERR(data))
return PTR_ERR(data);
data->dev = &auxdev->dev;
data->next_bridge = devm_drm_of_get_bridge(&auxdev->dev, auxdev->dev.of_node, 0, 0);
if (IS_ERR(data->next_bridge))
return dev_err_probe(&auxdev->dev, PTR_ERR(data->next_bridge),
"failed to acquire drm_bridge\n");
data->bridge.of_node = data->dev->of_node;
/* passthrough data, allow everything */
data->bridge.interlace_allowed = true;
data->bridge.ycbcr_420_allowed = true;
return devm_drm_bridge_add(data->dev, &data->bridge);
}
static const struct auxiliary_device_id drm_aux_bridge_table[] = {
{ .name = KBUILD_MODNAME ".aux_bridge" },
{},
};
MODULE_DEVICE_TABLE(auxiliary, drm_aux_bridge_table);
static struct auxiliary_driver drm_aux_bridge_drv = {
.name = "aux_bridge",
.id_table = drm_aux_bridge_table,
.probe = drm_aux_bridge_probe,
};
module_auxiliary_driver(drm_aux_bridge_drv);
MODULE_AUTHOR("Dmitry Baryshkov <dmitry.baryshkov@linaro.org>");
MODULE_DESCRIPTION("DRM transparent bridge");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/auxiliary_bus.h`, `linux/export.h`, `linux/module.h`, `linux/of.h`, `drm/drm_bridge.h`, `drm/bridge/aux-bridge.h`.
- Detected declarations: `struct drm_aux_bridge_data`, `function drm_aux_bridge_release`, `function drm_aux_bridge_unregister_adev`, `function drm_aux_bridge_register`, `function drm_aux_bridge_attach`, `function drm_aux_bridge_probe`, `export drm_aux_bridge_register`.
- Atlas domain: Driver Families / drivers/gpu.
- 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.