clk: Add dump operation to clk_ops
This adds dump function to struct clk_ops which should replace soc_clk_dump. It allows clock drivers to provide custom dump implementation without overriding generic CCF dump function. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Tested-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru> [ Fixed parameter name in documentation ] Signed-off-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20231109105516.24892-6-ivprusov@sberdevices.ru
This commit is contained in:
committed by
Sean Anderson
parent
4f48202ba8
commit
505ef5f627
@@ -25,6 +25,7 @@ struct ofnode_phandle_args;
|
||||
* @set_parent: Set current clock parent
|
||||
* @enable: Enable a clock.
|
||||
* @disable: Disable a clock.
|
||||
* @dump: Print clock information.
|
||||
*
|
||||
* The individual methods are described more fully below.
|
||||
*/
|
||||
@@ -39,6 +40,9 @@ struct clk_ops {
|
||||
int (*set_parent)(struct clk *clk, struct clk *parent);
|
||||
int (*enable)(struct clk *clk);
|
||||
int (*disable)(struct clk *clk);
|
||||
#if IS_ENABLED(CONFIG_CMD_CLK)
|
||||
void (*dump)(struct udevice *dev);
|
||||
#endif
|
||||
};
|
||||
|
||||
#if 0 /* For documentation only */
|
||||
@@ -135,6 +139,15 @@ int enable(struct clk *clk);
|
||||
* Return: zero on success, or -ve error code.
|
||||
*/
|
||||
int disable(struct clk *clk);
|
||||
|
||||
/**
|
||||
* dump() - Print clock information.
|
||||
* @dev: The clock device to dump.
|
||||
*
|
||||
* If present, this function is called by "clk dump" command for each
|
||||
* bound device.
|
||||
*/
|
||||
void dump(struct udevice *dev);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user