mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
clk: add clk_determine_rate_noop()
Add a new helper clk_determine_rate_noop() that's for clocks where the rate rounding is handled by the firmware/hardware, or the clock is capable of any rate. The requested rate is passed through unchanged, and the actual rate will be learned via recalc_rate() after the rate is set. This shared helper will be used to get rid of the driver-specific empty determine rate implementations that are present in the tree. Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
5f2db1ce20
commit
862e0773f1
|
|
@ -933,6 +933,24 @@ int clk_hw_determine_rate_no_reparent(struct clk_hw *hw,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(clk_hw_determine_rate_no_reparent);
|
||||
|
||||
/**
|
||||
* clk_determine_rate_noop - clk_ops::determine_rate noop implementation
|
||||
* @hw: clk to determine rate on
|
||||
* @req: rate request
|
||||
*
|
||||
* Noop determine rate for clocks where the rate rounding is handled by the
|
||||
* firmware/hardware, or the clock is capable of any rate. The requested rate is
|
||||
* passed through unchanged, and the actual rate will be learned via
|
||||
* recalc_rate() after the rate is set.
|
||||
*
|
||||
* Returns: 0 always
|
||||
*/
|
||||
int clk_determine_rate_noop(struct clk_hw *hw, struct clk_rate_request *req)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(clk_determine_rate_noop);
|
||||
|
||||
/*** clk api ***/
|
||||
|
||||
static void clk_core_rate_unprotect(struct clk_core *core)
|
||||
|
|
|
|||
|
|
@ -1472,6 +1472,7 @@ int clk_mux_determine_rate_flags(struct clk_hw *hw,
|
|||
unsigned long flags);
|
||||
int clk_hw_determine_rate_no_reparent(struct clk_hw *hw,
|
||||
struct clk_rate_request *req);
|
||||
int clk_determine_rate_noop(struct clk_hw *hw, struct clk_rate_request *req);
|
||||
void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent);
|
||||
void clk_hw_get_rate_range(struct clk_hw *hw, unsigned long *min_rate,
|
||||
unsigned long *max_rate);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user