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:	Thu, 12 Feb 2015 12:45:53 -0600
From:	Felipe Balbi <balbi@...com>
To:	David Cohen <david.a.cohen@...ux.intel.com>
CC:	<balbi@...com>, <linux-usb@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <yousaf.kaukab@...el.com>,
	<nirmala.bailur@...el.com>
Subject: Re: [RFC] USB phy type C

Hi,

On Thu, Feb 12, 2015 at 10:41:37AM -0800, David Cohen wrote:
> Hi Felipe, et al,
> 
> Is there any on going discussion regarding to USB phy for type C connectors?
> 
> We'd like to know the community's preferable direction for handling
> (still unsupported) cases like USB3.1 PD, Accessories and Alternate
> modes as a new layer or an extension of current USB phy layer.
> 
> Comments are welcome :)

Not the USB phy layer, but the generic phy layer. All you need to do is
add a new phy provider and add support for it from within dwc3.
Something like below:

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 9f0e209b8f6c..55a85b40e43e 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -653,6 +653,19 @@ static int dwc3_core_get_phy(struct dwc3 *dwc)
 		}
 	}
 
+	dwc->usb3_typec_phy = devm_phy_get(dev, "usb3-typec-phy");
+	if (IS_ERR(dwc->usb3_typec_phy)) {
+		ret = PTR_ERR(dwc->usb3_typec_phy);
+		if (ret == -ENOSYS || ret == -ENODEV) {
+			dwc->usb3_typec_phy = NULL;
+		} else if (ret == -EPROBE_DEFER) {
+			return ret;
+		} else {
+			dev_err(dev, "no usb3 typeC phy, continuing without\n");
+			dwc->usb3_typec_phy = NULL;
+		}
+	}
+
 	return 0;
 }
 

The only interesting part will be dealing with the other modes of
operation, I haven't wrapped my head around it yet.

-- 
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