clk: let init callback return an error code
If the init callback is allowed to request resources, it needs a return value to report the outcome of such a request. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lkml.kernel.org/r/20190924123954.31561-3-jbrunet@baylibre.com Reviewed-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:

committed by
Stephen Boyd

parent
f6fa75ca91
commit
89d079dc17
@@ -190,8 +190,12 @@ struct clk_duty {
|
||||
*
|
||||
* @init: Perform platform-specific initialization magic.
|
||||
* This is not not used by any of the basic clock types.
|
||||
* Please consider other ways of solving initialization problems
|
||||
* before using this callback, as its use is discouraged.
|
||||
* This callback exist for HW which needs to perform some
|
||||
* initialisation magic for CCF to get an accurate view of the
|
||||
* clock. It may also be used dynamic resource allocation is
|
||||
* required. It shall not used to deal with clock parameters,
|
||||
* such as rate or parents.
|
||||
* Returns 0 on success, -EERROR otherwise.
|
||||
*
|
||||
* @debug_init: Set up type-specific debugfs entries for this clock. This
|
||||
* is called once, after the debugfs directory entry for this
|
||||
@@ -243,7 +247,7 @@ struct clk_ops {
|
||||
struct clk_duty *duty);
|
||||
int (*set_duty_cycle)(struct clk_hw *hw,
|
||||
struct clk_duty *duty);
|
||||
void (*init)(struct clk_hw *hw);
|
||||
int (*init)(struct clk_hw *hw);
|
||||
void (*debug_init)(struct clk_hw *hw, struct dentry *dentry);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user