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] [day] [month] [year] [list]
Message-ID: <20140716144628.GC1365@saruman.home>
Date:	Wed, 16 Jul 2014 09:46:28 -0500
From:	Felipe Balbi <balbi@...com>
To:	Vivek Gautam <gautam.vivek@...sung.com>
CC:	<linux-usb@...r.kernel.org>, <linux-samsung-soc@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, <gregkh@...uxfoundation.org>,
	<kishon@...com>, <kgene.kim@...sung.com>,
	<mathias.nyman@...el.com>, <jwerner@...omium.org>,
	<sergei.shtylyov@...entembedded.com>,
	<heikki.krogerus@...ux.intel.com>, <pratyush.anand@...com>
Subject: Re: [PATCH v4 2/4] usb: host: xhci-plat: Get PHYs for xhci's hcds

On Wed, Jul 16, 2014 at 01:51:40PM +0530, Vivek Gautam wrote:
> The host controller by itself may sometimes need to handle PHY
> and/or calibrate some of the PHY settings to get full support out
> of the PHY controller. The PHY core provides a calibration
> funtionality now to do so.
> Therefore, facilitate getting the two possible PHYs, viz.
> USB 2.0 type (UTMI+) and USB 3.0 type (PIPE3).
> 
> Signed-off-by: Vivek Gautam <gautam.vivek@...sung.com>
> ---
> 
> Changes from v3:
>  - Modified error message as per review comments from Julius.
> 
>  drivers/usb/host/xhci-plat.c |   19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
> index 1a0cf9f..b1c0364 100644
> --- a/drivers/usb/host/xhci-plat.c
> +++ b/drivers/usb/host/xhci-plat.c
> @@ -16,6 +16,7 @@
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
> +#include <linux/phy/phy.h>
>  #include <linux/slab.h>
>  #include <linux/usb/xhci_pdriver.h>
>  
> @@ -180,6 +181,15 @@ static int xhci_plat_probe(struct platform_device *pdev)
>  			goto put_hcd;
>  	}
>  
> +	/* Get possile USB 2.0 type PHY (UTMI+) available with xhci */
> +	hcd->gen_phy = devm_phy_get(&pdev->dev, "usb2-phy");
> +	if (IS_ERR(hcd->gen_phy)) {
> +		ret = PTR_ERR(hcd->gen_phy);
> +		if (ret != -ENOSYS && ret != -ENODEV)
> +			dev_warn(&pdev->dev,
> +				 "Error retrieving usb2 phy: %d\n", ret);
> +	}

should you treat -EPROBE_DEFER differently here ?

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ