drivers/phy/qualcomm/phy-qcom-qmp-common.h
Source file repositories/reference/linux-study-clean/drivers/phy/qualcomm/phy-qcom-qmp-common.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/phy/qualcomm/phy-qcom-qmp-common.h- Extension
.h- Size
- 1268 bytes
- Lines
- 63
- Domain
- Driver Families
- Bucket
- drivers/phy
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct qmp_phy_init_tblfunction qmp_configure_lanefunction qmp_configure
Annotated Snippet
struct qmp_phy_init_tbl {
unsigned int offset;
unsigned int val;
char *name;
/*
* mask of lanes for which this register is written
* for cases when second lane needs different values
*/
u8 lane_mask;
};
#define QMP_PHY_INIT_CFG(o, v) \
{ \
.offset = o, \
.val = v, \
.name = #o, \
.lane_mask = 0xff, \
}
#define QMP_PHY_INIT_CFG_LANE(o, v, l) \
{ \
.offset = o, \
.val = v, \
.name = #o, \
.lane_mask = l, \
}
static inline void qmp_configure_lane(struct device *dev, void __iomem *base,
const struct qmp_phy_init_tbl tbl[],
int num, u8 lane_mask)
{
int i;
const struct qmp_phy_init_tbl *t = tbl;
if (!t)
return;
for (i = 0; i < num; i++, t++) {
if (!(t->lane_mask & lane_mask))
continue;
dev_dbg(dev, "Writing Reg: %s Offset: 0x%04x Val: 0x%02x\n",
t->name, t->offset, t->val);
writel(t->val, base + t->offset);
}
}
static inline void qmp_configure(struct device *dev, void __iomem *base,
const struct qmp_phy_init_tbl tbl[], int num)
{
qmp_configure_lane(dev, base, tbl, num, 0xff);
}
#endif
Annotation
- Detected declarations: `struct qmp_phy_init_tbl`, `function qmp_configure_lane`, `function qmp_configure`.
- Atlas domain: Driver Families / drivers/phy.
- 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.