Re: [PATCH] clk: Add clk_parent entry in debugfs
From: Leonard Crestez <hidden>
Date: 2019-06-08 12:48:56
Also in:
linux-clk
On 6/8/19 3:19 PM, Geert Uytterhoeven wrote:
Hi Leonard, On Sat, Jun 8, 2019 at 9:26 AM Leonard Crestez [off-list ref] wrote:quoted
On 6/7/19 10:05 PM, Stephen Boyd wrote:quoted
Quoting Leonard Crestez (2019-05-24 01:25:25)quoted
quoted
@@ -3040,10 +3051,11 @@ static void clk_debug_create_one(struct clk_core *core, struct dentry *pdentry) debugfs_create_u32("clk_enable_count", 0444, root, &core->enable_count); debugfs_create_u32("clk_protect_count", 0444, root, &core->protect_count); debugfs_create_u32("clk_notifier_count", 0444, root, &core->notifier_count); debugfs_create_file("clk_duty_cycle", 0444, root, core, &clk_duty_cycle_fops); + debugfs_create_file("clk_parent", 0444, root, core, ¤t_parent_fops);Shouldn't we skip creation of this file if core->num_parents == 0? So put this under the if condition below?It's still useful to determine clk tree structure from debugfs fields, otherwise you'd have to extract by parsing other files. Would you hide clk_rate for fixed-rate? I'd rather have everything available for uniformity, even if it's otherwise constant at runtime.Unless I' missing something, there's a big difference here: all clocks have a rate, but not all clocks have a parent.
Sorry, I got confused and thought that condition checked for muxes so the parent of intermediate clk nodes will be hidden. But intermediate nodes have num_parents == 1. Will fix in v2. -- Regards, Leonard _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel