linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [LINUX PATCHv5] clk: clk-fixed-factor: Return EPROBE_DEFER to wait for dependent drivers
@ 2019-03-30 12:02 Shubhrajyoti Datta
  2019-04-10 21:38 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Shubhrajyoti Datta @ 2019-03-30 12:02 UTC (permalink / raw)
  To: linux-clk; +Cc: sboyd, Shubhrajyoti Datta

In case the provider clock is not yet probed the fixed factor does not
find the name of the parent clock. This is because the parent clock is
not yet probed and in case of zynqmp the output-names is omitted.

This is a temporary solution however the critical components
like firmware probe should happen early.
Fixes a probe failure.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
v2:Fix the return value in other cases

 drivers/clk/clk-fixed-factor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
index f3ae4ff..36cbb0c 100644
--- a/drivers/clk/clk-fixed-factor.c
+++ b/drivers/clk/clk-fixed-factor.c
@@ -171,6 +171,8 @@ static struct clk *_of_fixed_factor_clk_setup(struct device_node *node)

        of_property_read_string(node, "clock-output-names", &clk_name);
        parent_name = of_clk_get_parent_name(node, 0);
+       if (!parent_name)
+               return ERR_PTR(-EPROBE_DEFER);

        if (of_match_node(set_rate_parent_matches, node))
                flags |= CLK_SET_RATE_PARENT;
--
2.1.1

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-10 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-30 12:02 [LINUX PATCHv5] clk: clk-fixed-factor: Return EPROBE_DEFER to wait for dependent drivers Shubhrajyoti Datta
2019-04-10 21:38 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).