linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
To: <linux-clk@vger.kernel.org>
Cc: <sboyd@kernel.org>, Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Subject: [LINUX PATCHv5] clk: clk-fixed-factor: Return EPROBE_DEFER to wait for dependent drivers
Date: Sat, 30 Mar 2019 17:32:18 +0530	[thread overview]
Message-ID: <1553947338-12470-1-git-send-email-shubhrajyoti.datta@xilinx.com> (raw)

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.

             reply	other threads:[~2019-03-30 12:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30 12:02 Shubhrajyoti Datta [this message]
2019-04-10 21:38 ` [LINUX PATCHv5] clk: clk-fixed-factor: Return EPROBE_DEFER to wait for dependent drivers Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1553947338-12470-1-git-send-email-shubhrajyoti.datta@xilinx.com \
    --to=shubhrajyoti.datta@xilinx.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).