From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ohci-platform: Add support for devicetree instantiation
Date: Wed, 08 Jan 2014 17:00:53 +0100 [thread overview]
Message-ID: <52CD7635.8040102@redhat.com> (raw)
In-Reply-To: <52CA603B.3070203@redhat.com>
Hi,
On 01/06/2014 08:50 AM, Hans de Goede wrote:
<snip>
>> Otherwise you don't know the difference between "no clock
>> provided", "error getting the clock reference" and "clock controller not
>> initialized yet, try again".
>
> I guess of these 3 we really only want to continue on "no clock provided",
> so I think something like this (for both clks and the phy) would be best:
>
> priv->ahb_clk = devm_clk_get(&dev->dev, "ahb");
> if (IS_ERR(priv->ahb_clk)) {
> err = PTR_ERR(priv->ahb_clk);
> if (err != -EINVAL && err != -ENODATA)
> goto err_put_hcd;
> priv->ahb_clk = NULL; /* No clock provided */
> }
>
> To clarify -EINVAL will be returned when there is no clock-names, and
> -ENODATA when the specified name is not found in clock-names.
Ok, so I've got this wrong, if there is no clk by that name specified
in dt -ENOENT will be returned. Actually -ENOENT is the only
error clk_get and thus devm_clk_get will ever return.
So it seems that clk_get currently is not properly passing along
probe-deferral. To make things future proof I will add a probe
deferral check to the next version of my patch.
Regards,
Hans
next prev parent reply other threads:[~2014-01-08 16:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-05 23:04 [PATCH 1/2] ohci-platform: Add support for devicetree instantiation Hans de Goede
2014-01-05 23:04 ` [PATCH 2/2] ehci-platform: Add support for clks and phy passed through devicetree Hans de Goede
2014-01-06 15:52 ` Mark Rutland
2014-01-06 7:16 ` [PATCH 1/2] ohci-platform: Add support for devicetree instantiation Arnd Bergmann
2014-01-06 7:50 ` Hans de Goede
2014-01-06 16:03 ` Arnd Bergmann
2014-01-08 16:00 ` Hans de Goede [this message]
2014-01-06 15:45 ` Mark Rutland
2014-01-07 21:01 ` Hans de Goede
2014-01-06 15:49 ` Alan Stern
2014-01-07 21:03 ` Hans de Goede
2014-01-07 21:16 ` Arnd Bergmann
2014-01-07 21:26 ` Hans de Goede
2014-01-08 16:59 ` Alan Stern
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=52CD7635.8040102@redhat.com \
--to=hdegoede@redhat.com \
--cc=linux-arm-kernel@lists.infradead.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).