drivers/pwm/pwm-dwc.h
Source file repositories/reference/linux-study-clean/drivers/pwm/pwm-dwc.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/pwm/pwm-dwc.h- Extension
.h- Size
- 1710 bytes
- Lines
- 75
- Domain
- Driver Families
- Bucket
- drivers/pwm
- 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 dwc_pwm_infostruct dwc_pwm_drvdatastruct dwc_pwm_ctxstruct dwc_pwmfunction dwc_pwm_readlfunction dwc_pwm_writel
Annotated Snippet
struct dwc_pwm_info {
unsigned int nr;
unsigned int size;
};
struct dwc_pwm_drvdata {
const struct dwc_pwm_info *info;
void __iomem *io_base;
struct pwm_chip *chips[];
};
struct dwc_pwm_ctx {
u32 cnt;
u32 cnt2;
u32 ctrl;
};
struct dwc_pwm {
void __iomem *base;
unsigned int clk_ns;
struct dwc_pwm_ctx ctx[DWC_TIMERS_TOTAL];
};
static inline struct dwc_pwm *to_dwc_pwm(struct pwm_chip *chip)
{
return pwmchip_get_drvdata(chip);
}
static inline u32 dwc_pwm_readl(struct dwc_pwm *dwc, u32 offset)
{
return readl(dwc->base + offset);
}
static inline void dwc_pwm_writel(struct dwc_pwm *dwc, u32 value, u32 offset)
{
writel(value, dwc->base + offset);
}
extern struct pwm_chip *dwc_pwm_alloc(struct device *dev);
Annotation
- Detected declarations: `struct dwc_pwm_info`, `struct dwc_pwm_drvdata`, `struct dwc_pwm_ctx`, `struct dwc_pwm`, `function dwc_pwm_readl`, `function dwc_pwm_writel`.
- Atlas domain: Driver Families / drivers/pwm.
- 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.