drivers/dpll/zl3073x/core.h
Source file repositories/reference/linux-study-clean/drivers/dpll/zl3073x/core.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/dpll/zl3073x/core.h- Extension
.h- Size
- 11440 bytes
- Lines
- 419
- Domain
- Driver Families
- Bucket
- drivers/dpll
- 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/bitfield.hlinux/kthread.hlinux/list.hlinux/mutex.hlinux/types.hchan.hout.href.hregs.hsynth.h
Detected Declarations
struct devicestruct regmapstruct zl3073x_dpllstruct zl3073x_chip_infostruct zl3073x_devstruct zl3073x_hwreg_seq_itemenum zl3073x_flagsfunction zl3073x_dev_phase_avg_factor_getfunction zl3073x_dev_is_ref_phase_comp_32bitfunction zl3073x_is_n_pinfunction zl3073x_is_p_pinfunction zl3073x_input_pin_ref_getfunction zl3073x_output_pin_out_getfunction zl3073x_dev_ref_freq_getfunction zl3073x_dev_ref_is_difffunction zl3073x_dev_ref_is_status_okfunction zl3073x_dev_synth_freq_getfunction zl3073x_dev_out_synth_getfunction zl3073x_dev_out_is_enabledfunction zl3073x_dev_out_dpll_getfunction zl3073x_dev_output_pin_freq_getfunction zl3073x_dev_out_is_difffunction zl3073x_dev_output_pin_is_enabled
Annotated Snippet
struct zl3073x_chip_info {
u16 id;
u8 num_channels;
unsigned long flags;
};
/**
* struct zl3073x_dev - zl3073x device
* @dev: pointer to device
* @regmap: regmap to access device registers
* @info: detected chip info
* @multiop_lock: to serialize multiple register operations
* @ref: array of input references' invariants
* @out: array of outs' invariants
* @synth: array of synths' invariants
* @chan: array of DPLL channels' state
* @dplls: list of DPLLs
* @kworker: thread for periodic work
* @work: periodic work
* @clock_id: clock id of the device
* @phase_avg_factor: phase offset measurement averaging factor
* @freq_monitor: is frequency monitor enabled
*/
struct zl3073x_dev {
struct device *dev;
struct regmap *regmap;
const struct zl3073x_chip_info *info;
struct mutex multiop_lock;
/* Invariants */
struct zl3073x_ref ref[ZL3073X_NUM_REFS];
struct zl3073x_out out[ZL3073X_NUM_OUTS];
struct zl3073x_synth synth[ZL3073X_NUM_SYNTHS];
struct zl3073x_chan chan[ZL3073X_MAX_CHANNELS];
/* DPLL channels */
struct list_head dplls;
/* Monitor */
struct kthread_worker *kworker;
struct kthread_delayed_work work;
/* Per-chip parameters */
u64 clock_id;
u8 phase_avg_factor;
bool freq_monitor;
};
extern const struct regmap_config zl3073x_regmap_config;
struct zl3073x_dev *zl3073x_devm_alloc(struct device *dev);
int zl3073x_dev_probe(struct zl3073x_dev *zldev);
int zl3073x_dev_start(struct zl3073x_dev *zldev, bool full);
void zl3073x_dev_stop(struct zl3073x_dev *zldev);
static inline u8 zl3073x_dev_phase_avg_factor_get(struct zl3073x_dev *zldev)
{
return zldev->phase_avg_factor;
}
int zl3073x_dev_phase_avg_factor_set(struct zl3073x_dev *zldev, u8 factor);
/**********************
* Registers operations
**********************/
/**
* struct zl3073x_hwreg_seq_item - HW register write sequence item
* @addr: HW register to be written
* @value: value to be written to HW register
* @mask: bitmask indicating bits to be updated
* @wait: number of ms to wait after register write
*/
struct zl3073x_hwreg_seq_item {
u32 addr;
u32 value;
u32 mask;
u32 wait;
};
#define HWREG_SEQ_ITEM(_addr, _value, _mask, _wait) \
{ \
.addr = _addr, \
.value = FIELD_PREP_CONST(_mask, _value), \
.mask = _mask, \
.wait = _wait, \
}
int zl3073x_mb_op(struct zl3073x_dev *zldev, unsigned int op_reg, u8 op_val,
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/kthread.h`, `linux/list.h`, `linux/mutex.h`, `linux/types.h`, `chan.h`, `out.h`, `ref.h`.
- Detected declarations: `struct device`, `struct regmap`, `struct zl3073x_dpll`, `struct zl3073x_chip_info`, `struct zl3073x_dev`, `struct zl3073x_hwreg_seq_item`, `enum zl3073x_flags`, `function zl3073x_dev_phase_avg_factor_get`, `function zl3073x_dev_is_ref_phase_comp_32bit`, `function zl3073x_is_n_pin`.
- Atlas domain: Driver Families / drivers/dpll.
- 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.