drivers/media/pci/ddbridge/ddbridge-io.h
Source file repositories/reference/linux-study-clean/drivers/media/pci/ddbridge/ddbridge-io.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/ddbridge/ddbridge-io.h- Extension
.h- Size
- 1439 bytes
- Lines
- 63
- 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/io.hddbridge.h
Detected Declarations
function Copyrightfunction ddblwritelfunction ddbreadlfunction ddbwritelfunction ddbcpytofunction ddbcpyfromfunction safe_ddbreadl
Annotated Snippet
#ifndef __DDBRIDGE_IO_H__
#define __DDBRIDGE_IO_H__
#include <linux/io.h>
#include "ddbridge.h"
/******************************************************************************/
static inline u32 ddblreadl(struct ddb_link *link, u32 adr)
{
return readl(link->dev->regs + adr);
}
static inline void ddblwritel(struct ddb_link *link, u32 val, u32 adr)
{
writel(val, link->dev->regs + adr);
}
static inline u32 ddbreadl(struct ddb *dev, u32 adr)
{
return readl(dev->regs + adr);
}
static inline void ddbwritel(struct ddb *dev, u32 val, u32 adr)
{
writel(val, dev->regs + adr);
}
static inline void ddbcpyto(struct ddb *dev, u32 adr, void *src, long count)
{
memcpy_toio(dev->regs + adr, src, count);
}
static inline void ddbcpyfrom(struct ddb *dev, void *dst, u32 adr, long count)
{
memcpy_fromio(dst, dev->regs + adr, count);
}
static inline u32 safe_ddbreadl(struct ddb *dev, u32 adr)
{
u32 val = ddbreadl(dev, adr);
/* (ddb)readl returns (uint)-1 (all bits set) on failure, catch that */
if (val == ~0) {
dev_err(&dev->pdev->dev, "ddbreadl failure, adr=%08x\n", adr);
return 0;
}
return val;
}
#endif /* __DDBRIDGE_IO_H__ */
Annotation
- Immediate include surface: `linux/io.h`, `ddbridge.h`.
- Detected declarations: `function Copyright`, `function ddblwritel`, `function ddbreadl`, `function ddbwritel`, `function ddbcpyto`, `function ddbcpyfrom`, `function safe_ddbreadl`.
- 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.