drivers/clk/rockchip/clk-rk3576.c

Source file repositories/reference/linux-study-clean/drivers/clk/rockchip/clk-rk3576.c

File Facts

System
Linux kernel
Corpus path
drivers/clk/rockchip/clk-rk3576.c
Extension
.c
Size
87455 bytes
Lines
1861
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 clk_rk3576_inits {
	void (*inits)(struct device_node *np);
};

static const struct clk_rk3576_inits clk_rk3576_cru_init = {
	.inits = rk3576_clk_init,
};

static const struct of_device_id clk_rk3576_match_table[] = {
	{
		.compatible = "rockchip,rk3576-cru",
		.data = &clk_rk3576_cru_init,
	},
	{ }
};

static int clk_rk3576_probe(struct platform_device *pdev)
{
	const struct clk_rk3576_inits *init_data;
	struct device *dev = &pdev->dev;

	init_data = device_get_match_data(dev);
	if (!init_data)
		return -EINVAL;

	if (init_data->inits)
		init_data->inits(dev->of_node);

	return 0;
}

static struct platform_driver clk_rk3576_driver = {
	.probe		= clk_rk3576_probe,
	.driver		= {
		.name	= "clk-rk3576",
		.of_match_table = clk_rk3576_match_table,
		.suppress_bind_attrs = true,
	},
};
builtin_platform_driver_probe(clk_rk3576_driver, clk_rk3576_probe);

Annotation

Implementation Notes