From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] ohci-platform: Add support for devicetree instantiation
Date: Thu, 09 Jan 2014 19:07:16 +0100 [thread overview]
Message-ID: <4432391.5QkdBVBQQi@wuerfel> (raw)
In-Reply-To: <1389290226-6971-2-git-send-email-hdegoede@redhat.com>
On Thursday 09 January 2014 18:57:05 Hans de Goede wrote:
> + if (pdata == &ohci_platform_defaults && dev->dev.of_node) {
> + priv->phy = devm_phy_get(&dev->dev, "usb");
> + if (IS_ERR(priv->phy)) {
> + err = PTR_ERR(priv->phy);
> + if (err == -EPROBE_DEFER)
> + goto err_put_hcd;
> + priv->phy = NULL;
> + }
> +
> + for (clk = 0; clk < OHCI_MAX_CLKS; clk++) {
> + priv->clks[clk] = of_clk_get(dev->dev.of_node, clk);
> + if (IS_ERR(priv->clks[clk])) {
> + err = PTR_ERR(priv->clks[clk]);
> + if (err == -EPROBE_DEFER)
> + goto err_put_clks;
> + priv->clks[clk] = NULL;
> + break;
> + }
> + }
> + }
Ah, very nice! This way it will actually work to replace a number
of older drivers that require a specific clock name.
I still think we should change the phy subsystem to allow the
same, that would make it more consistent here, and avoid the
need for coming up with a number of bogus phy names for random
drivers that can only ever have one phy.
Arnd
next prev parent reply other threads:[~2014-01-09 18:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 17:57 [PATCH v3 0/2] ohci and ehci-platform clks, phy and dt support Hans de Goede
2014-01-09 17:57 ` [PATCH v3 1/2] ohci-platform: Add support for devicetree instantiation Hans de Goede
2014-01-09 18:07 ` Arnd Bergmann [this message]
2014-01-09 18:18 ` Hans de Goede
2014-01-09 20:14 ` Sergei Shtylyov
2014-01-09 19:48 ` Hans de Goede
2014-01-09 21:08 ` Sergei Shtylyov
2014-01-10 9:47 ` [linux-sunxi] " Hans de Goede
2014-01-10 22:02 ` Sergei Shtylyov
2014-01-09 20:36 ` Alan Stern
2014-01-10 10:13 ` Hans de Goede
2014-01-10 15:29 ` Alan Stern
2014-01-09 17:57 ` [PATCH v3 2/2] ehci-platform: Add support for clks and phy passed through devicetree Hans de Goede
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=4432391.5QkdBVBQQi@wuerfel \
--to=arnd@arndb.de \
--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).