diff mbox

clk: gpio: Add debug messages for clock ops

Message ID 1486239750-24846-1-git-send-email-ce3a@gmx.de (mailing list archive)
State Rejected
Delegated to: Stephen Boyd
Headers show

Commit Message

Sergej Sawazki Feb. 4, 2017, 8:22 p.m. UTC
Debug messages are helpful when debugging the clock tree setup.

Cc: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Sergej Sawazki <ce3a@gmx.de>
---
 drivers/clk/clk-gpio.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Stephen Boyd Feb. 6, 2017, 7:41 p.m. UTC | #1
On 02/04/2017 12:22 PM, Sergej Sawazki wrote:
> Debug messages are helpful when debugging the clock tree setup.
>
> Cc: Jyri Sarha <jsarha@ti.com>
> Signed-off-by: Sergej Sawazki <ce3a@gmx.de>
>

Can you use clk tracepoints instead?
Sergej Sawazki Feb. 6, 2017, 8:46 p.m. UTC | #2
On Mon, 6 Feb 2017 11:41:44 -0800, Stephen Boyd wrote:
> On 02/04/2017 12:22 PM, Sergej Sawazki wrote:
>> Debug messages are helpful when debugging the clock tree setup.

> Can you use clk tracepoints instead?
>

Probably yes, but I have been debugging the rest of the system with
the help of dynamic debug (dmesg) and found it pretty simple.
The si5351 driver, for example, has a lot dev_dbg()'s, which were
very helpful.
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/clk/clk-gpio.c b/drivers/clk/clk-gpio.c
index 86b2457..012c289 100644
--- a/drivers/clk/clk-gpio.c
+++ b/drivers/clk/clk-gpio.c
@@ -38,6 +38,7 @@  static int clk_gpio_gate_enable(struct clk_hw *hw)
 	struct clk_gpio *clk = to_clk_gpio(hw);
 
 	gpiod_set_value(clk->gpiod, 1);
+	pr_debug("%s clock enabled\n", clk_hw_get_name(hw));
 
 	return 0;
 }
@@ -47,6 +48,7 @@  static void clk_gpio_gate_disable(struct clk_hw *hw)
 	struct clk_gpio *clk = to_clk_gpio(hw);
 
 	gpiod_set_value(clk->gpiod, 0);
+	pr_debug("%s clock disabled\n", clk_hw_get_name(hw));
 }
 
 static int clk_gpio_gate_is_enabled(struct clk_hw *hw)
@@ -83,6 +85,7 @@  static int clk_gpio_mux_set_parent(struct clk_hw *hw, u8 index)
 	struct clk_gpio *clk = to_clk_gpio(hw);
 
 	gpiod_set_value(clk->gpiod, index);
+	pr_debug("%s set parent %d\n", clk_hw_get_name(hw), index);
 
 	return 0;
 }