devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Alan Stern
	<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
	Tony Prisk <linux-ci5G2KO2hbZ+pU9mqzGVBQ@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-usb <linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

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

  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
     [not found] ` <1389290226-6971-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-09 17:57   ` [PATCH v3 1/2] ohci-platform: Add support for devicetree instantiation Hans de Goede
     [not found]     ` <1389290226-6971-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-09 18:07       ` Arnd Bergmann [this message]
2014-01-09 18:18         ` Hans de Goede
2014-01-09 20:14       ` Sergei Shtylyov
     [not found]         ` <52CF0326.1090407-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-01-09 19:48           ` Hans de Goede
     [not found]             ` <52CEFCFE.7080308-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-09 21:08               ` Sergei Shtylyov
     [not found]                 ` <52CF0FB1.1010109-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-01-10  9:47                   ` Hans de Goede
     [not found]                     ` <52CFC1A8.4010505-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-10 22:02                       ` Sergei Shtylyov
2014-01-09 20:36       ` Alan Stern
     [not found]         ` <Pine.LNX.4.44L0.1401091446310.1493-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-01-10 10:13           ` Hans de Goede
     [not found]             ` <52CFC7DC.3010406-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
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-r2ngtmty4d4@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-ci5G2KO2hbZ+pU9mqzGVBQ@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.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).