diff options
author | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2021-11-19 15:12:07 +0100 |
---|---|---|
committer | Sean Anderson <seanga2@gmail.com> | 2021-12-15 12:16:16 -0500 |
commit | 560e1e005093b1d62c53391d68960237294e7f89 (patch) | |
tree | 5b495a689f69510df054cbe668106fb2660ed79a /drivers/clk/clk-gate.c | |
parent | 572c446e98e224555be1ae2add1b49ff1a60ed7a (diff) |
clk: define LOG_CATEGORY for generic and ccf clocks
Define LOG_CATEGORY to allow filtering with log command
for generic clock and CCF clocks.
This patch also change existing printf, debug and pr_ macro
to log_ or dev_ macro.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Diffstat (limited to 'drivers/clk/clk-gate.c')
-rw-r--r-- | drivers/clk/clk-gate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c index 708499d95a..aa40daf3d7 100644 --- a/drivers/clk/clk-gate.c +++ b/drivers/clk/clk-gate.c @@ -7,12 +7,16 @@ * Gated clock implementation */ +#define LOG_CATEGORY UCLASS_CLK + #include <common.h> #include <clk.h> +#include <log.h> #include <clk-uclass.h> #include <malloc.h> #include <asm/io.h> #include <dm/device.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/bitops.h> #include <linux/clk-provider.h> @@ -124,7 +128,7 @@ struct clk *clk_register_gate(struct device *dev, const char *name, if (clk_gate_flags & CLK_GATE_HIWORD_MASK) { if (bit_idx > 15) { - pr_err("gate bit exceeds LOWORD field\n"); + dev_err(dev, "gate bit exceeds LOWORD field\n"); return ERR_PTR(-EINVAL); } } |