summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIgor Prusov <[email protected]>2023-11-09 13:55:13 +0300
committerSean Anderson <[email protected]>2023-12-15 13:05:54 -0500
commit505ef5f627d8bac4281310fe4800cc6c789627e9 (patch)
tree8cfa6da2b5d7971f1dc3a05954ec88446192e730 /include
parent4f48202ba82ee336ee9cc1bd12fb2fca8661d5ec (diff)
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 <[email protected]> Tested-by: Patrice Chotard <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Signed-off-by: Igor Prusov <[email protected]> [ Fixed parameter name in documentation ] Signed-off-by: Sean Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include')
-rw-r--r--include/clk-uclass.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/clk-uclass.h b/include/clk-uclass.h
index a22f1a5d848..cd62848bece 100644
--- a/include/clk-uclass.h
+++ b/include/clk-uclass.h
@@ -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