diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2019-09-24 14:39:53 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2019-12-23 18:53:13 -0800 |
commit | 89d079dc17e8a32397de827cc85c1f4911b90424 (patch) | |
tree | 13bd00045568d89041edc78c77ebd5d4c027e3e7 /include/linux/clk-provider.h | |
parent | f6fa75ca912be6021335de63a32aa4d295f3c524 (diff) | |
download | lwn-89d079dc17e8a32397de827cc85c1f4911b90424.tar.gz lwn-89d079dc17e8a32397de827cc85c1f4911b90424.zip |
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>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r-- | include/linux/clk-provider.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index caf4b9df16eb..eed243c2c73e 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -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); }; |