Speaking of which: those clk_*() interfaces need to be better
specified. Right now they're too vague to support fully portable
callers.
- What kind of "rounding" is provided? Using a 10 MHz target
rate as an example, with a 48 MHz base and a binary divider:
* "not-lower-than" would give 12 MHz (divide-by-4)
* "not-higher-than" would give 6 MHz (divide-by-8)
* "closest" would give 12 MHz, only 2 MHz off
The differences can matter, depending on what the clock drives.
Similarly, for DPLL based clocks (out = (in/DIV)*MUL) there
can be "lowest power" goals, like "use biggest DIV that
produces an output within <this> error bound".
- Does clk_set_rate() round, or does it fail when it can't set
that exact rate? (Would an 0.05% difference matter?)
This issue is orthogonal to whether clocklib merges or not (and
if so, when) ... except that if it does merge, then the answers
from clocklib will become the de facto answer to those questions.
- Dave
--