drivers/clk/ti/clkt_dpll.c

Source file repositories/reference/linux-study-clean/drivers/clk/ti/clkt_dpll.c

File Facts

System
Linux kernel
Corpus path
drivers/clk/ti/clkt_dpll.c
Extension
.c
Size
10503 bytes
Lines
372
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

if (delta < prev_min_delta) {
			prev_min_delta = delta;
			min_delta_m = m;
			min_delta_n = n;
		}

		pr_debug("clock: %s: m = %d: n = %d: new_rate = %lu\n",
			 clk_name, m, n, new_rate);

		if (delta == 0)
			break;
	}

	if (prev_min_delta == LONG_MAX) {
		pr_debug("clock: %s: cannot round to rate %lu\n",
			 clk_name, req->rate);
		return -EINVAL;
	}

	dd->last_rounded_m = min_delta_m;
	dd->last_rounded_n = min_delta_n;
	dd->last_rounded_rate = req->rate - prev_min_delta;

	req->rate = dd->last_rounded_rate;

	return 0;
}

Annotation

Implementation Notes