clk_round_rate(9)

clk_round_rate9

Adjust a rate to the exact rate a clock can provide

Usage

long clk_round_rate(struct clk * clk, unsigned long rate);

Arguments

clk

clock source

rate

desired clock rate in Hz

Overview

This answers the question “if I were to pass rate to clk_set_rate, what clock rate would I end up with?” without changing the hardware in any way. In other words:

rate = clk_round_rate(clk, r);

and:

clk_set_rate(clk, r); rate = clk_get_rate(clk);

are equivalent except the former does not modify the clock hardware in any way.

Returns rounded clock rate in Hz, or negative errno.

Releases

5 releases since Debian 5.0 (Lenny); the text changed 4 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.