drivers/clk/sunxi-ng/ccu_frac.h

Source file repositories/reference/linux-study-clean/drivers/clk/sunxi-ng/ccu_frac.h

File Facts

System
Linux kernel
Corpus path
drivers/clk/sunxi-ng/ccu_frac.h
Extension
.h
Size
1137 bytes
Lines
46
Domain
Driver Families
Bucket
drivers/clk
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ccu_frac_internal {
	u32		enable;
	u32		select;

	unsigned long	rates[2];
};

#define _SUNXI_CCU_FRAC(_enable, _select, _rate1, _rate2)		\
	{								\
		.enable	= _enable,					\
		.select	= _select,					\
		.rates = { _rate1, _rate2 },				\
	}

bool ccu_frac_helper_is_enabled(struct ccu_common *common,
				struct ccu_frac_internal *cf);
void ccu_frac_helper_enable(struct ccu_common *common,
			    struct ccu_frac_internal *cf);
void ccu_frac_helper_disable(struct ccu_common *common,
			     struct ccu_frac_internal *cf);

bool ccu_frac_helper_has_rate(struct ccu_common *common,
			      struct ccu_frac_internal *cf,
			      unsigned long rate);

unsigned long ccu_frac_helper_read_rate(struct ccu_common *common,
					struct ccu_frac_internal *cf);

int ccu_frac_helper_set_rate(struct ccu_common *common,
			     struct ccu_frac_internal *cf,
			     unsigned long rate, u32 lock);

#endif /* _CCU_FRAC_H_ */

Annotation

Implementation Notes