diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clk-uclass.h | 8 | ||||
-rw-r--r-- | include/clk.h | 8 | ||||
-rw-r--r-- | include/linux/clk-provider.h | 8 |
3 files changed, 15 insertions, 9 deletions
diff --git a/include/clk-uclass.h b/include/clk-uclass.h index e44f1ca..65ebff9 100644 --- a/include/clk-uclass.h +++ b/include/clk-uclass.h @@ -32,7 +32,7 @@ struct clk_ops { int (*of_xlate)(struct clk *clock, struct ofnode_phandle_args *args); int (*request)(struct clk *clock); - int (*rfree)(struct clk *clock); + void (*rfree)(struct clk *clock); ulong (*round_rate)(struct clk *clk, ulong rate); ulong (*get_rate)(struct clk *clk); ulong (*set_rate)(struct clk *clk, ulong rate); @@ -81,11 +81,9 @@ int request(struct clk *clock); * rfree() - Free a previously requested clock. * @clock: The clock to free. * - * This is the implementation of the client clk_free() API. - * - * Return: 0 if OK, or a negative error code. + * Free any resources allocated in request(). */ -int rfree(struct clk *clock); +void rfree(struct clk *clock); /** * round_rate() - Adjust a rate to the exact rate a clock can provide. diff --git a/include/clk.h b/include/clk.h index 23e4d4e..76bb64b 100644 --- a/include/clk.h +++ b/include/clk.h @@ -414,9 +414,9 @@ int clk_request(struct udevice *dev, struct clk *clk); * @clk: A clock struct that was previously successfully requested by * clk_request/get_by_*(). * - * Return: 0 if OK, or a negative error code. + * Free resources allocated by clk_request() (or any clk_get_* function). */ -int clk_free(struct clk *clk); +void clk_free(struct clk *clk); /** * clk_get_rate() - Get current clock rate. @@ -562,9 +562,9 @@ static inline int clk_request(struct udevice *dev, struct clk *clk) return -ENOSYS; } -static inline int clk_free(struct clk *clk) +static inline void clk_free(struct clk *clk) { - return 0; + return; } static inline ulong clk_get_rate(struct clk *clk) diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 9a61166..2d04882 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -254,4 +254,12 @@ const char *clk_hw_get_name(const struct clk *hw); ulong clk_generic_get_rate(struct clk *clk); struct clk *dev_get_clk_ptr(struct udevice *dev); + +ulong ccf_clk_get_rate(struct clk *clk); +ulong ccf_clk_set_rate(struct clk *clk, unsigned long rate); +int ccf_clk_set_parent(struct clk *clk, struct clk *parent); +int ccf_clk_enable(struct clk *clk); +int ccf_clk_disable(struct clk *clk); +extern const struct clk_ops ccf_clk_ops; + #endif /* __LINUX_CLK_PROVIDER_H */ |