• Chen-Yu Tsai's avatar
    clk: Fix debugfs clk_possible_parents for clks without parent string names · 2d156b78
    Chen-Yu Tsai authored
    Following the commit fc0c209c ("clk: Allow parents to be specified
    without string names"), the parent name string is not always populated.
    
    Instead, fetch the parents clk_core struct using the appropriate helper,
    and read its name directly. If that fails, go through the possible
    sources of parent names. The order in which they are used is different
    from how parents are looked up, with the global name having precedence
    over local fw_name and indices. This makes more sense as a) the
    parent_maps structure does not differentiate between legacy global names
    and fallback global names, and b) global names likely provide more
    information than local fw_names.
    
    Fixes: fc0c209c ("clk: Allow parents to be specified without string names")
    Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
    2d156b78
clk.c 116 KB