lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 6 May 2014 15:33:41 +0200
From:	Andrew Lunn <andrew@...n.ch>
To:	Gregory CLEMENT <gregory.clement@...e-electrons.com>
Cc:	Mathias Nyman <mathias.nyman@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Felipe Balbi <balbi@...com>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, Jason Cooper <jason@...edaemon.net>,
	Andrew Lunn <andrew@...n.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
	Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
	linux-arm-kernel@...ts.infradead.org,
	Lior Amsalem <alior@...vell.com>,
	Tawfik Bayouk <tawfik@...vell.com>,
	Nadav Haklai <nadavh@...vell.com>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH v3 02/20] usb: ehci-orion: Add the optional PHY support

On Tue, May 06, 2014 at 02:13:57AM +0200, Gregory CLEMENT wrote:
> This commit allows to use the PHY provided through the device tree. It
> will be useful for the Armada 375 SoCs. if no PHY is provided then the
> behavior of the driver is unchanged.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@...e-electrons.com>
> ---
>  drivers/usb/host/ehci-orion.c | 25 +++++++++++++++++++++++--
>  1 file changed, 23 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
> index d6c19c37c76b..f6d9eb2e33cd 100644
> --- a/drivers/usb/host/ehci-orion.c
> +++ b/drivers/usb/host/ehci-orion.c
> @@ -15,6 +15,7 @@
>  #include <linux/clk.h>
>  #include <linux/platform_data/usb-ehci-orion.h>
>  #include <linux/of.h>
> +#include <linux/phy/phy.h>
>  #include <linux/of_device.h>
>  #include <linux/of_irq.h>
>  #include <linux/usb.h>
> @@ -46,6 +47,7 @@
>  
>  struct orion_ehci_hcd {
>  	struct clk *clk;
> +	struct phy *phy;
>  };
>  
>  static const char hcd_name[] = "ehci-orion";
> @@ -224,6 +226,18 @@ static int ehci_orion_drv_probe(struct platform_device *pdev)
>  	if (!IS_ERR(priv->clk))
>  		clk_prepare_enable(priv->clk);
>  
> +
> +	priv->phy = devm_phy_get(&pdev->dev, "usb");
> +	if (!IS_ERR(priv->phy)) {
> +		err = phy_init(priv->phy);
> +		if (err)
> +			goto err2;
> +
> +		err = phy_power_on(priv->phy);
> +		if (err)
> +			goto err3;
> +	}

Hi Gregory

What about EPROBE_DEFERRED?

     Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ