Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752650AbbBLTzn (ORCPT ); Thu, 12 Feb 2015 14:55:43 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:47445 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751518AbbBLTzV (ORCPT ); Thu, 12 Feb 2015 14:55:21 -0500 Date: Thu, 12 Feb 2015 13:55:10 -0600 From: Felipe Balbi To: David Cohen CC: Felipe Balbi , , , , Subject: Re: [RFC] USB phy type C Message-ID: <20150212195510.GG31034@saruman.tx.rr.com> Reply-To: References: <20150212184137.GA21337@psi-dev26.jf.intel.com> <20150212184553.GE31034@saruman.tx.rr.com> <20150212192728.GB21337@psi-dev26.jf.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hcut4fGOf7Kh6EdG" Content-Disposition: inline In-Reply-To: <20150212192728.GB21337@psi-dev26.jf.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3017 Lines: 85 --hcut4fGOf7Kh6EdG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 12, 2015 at 11:27:28AM -0800, David Cohen wrote: > On Thu, Feb 12, 2015 at 12:45:53PM -0600, Felipe Balbi wrote: > > Hi, > >=20 > > On Thu, Feb 12, 2015 at 10:41:37AM -0800, David Cohen wrote: > > > Hi Felipe, et al, > > >=20 > > > Is there any on going discussion regarding to USB phy for type C conn= ectors? > > >=20 > > > 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. > > >=20 > > > Comments are welcome :) > >=20 > > 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: > >=20 > > 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) > > } > > } > > =20 > > + dwc->usb3_typec_phy =3D devm_phy_get(dev, "usb3-typec-phy"); > > + if (IS_ERR(dwc->usb3_typec_phy)) { > > + ret =3D PTR_ERR(dwc->usb3_typec_phy); > > + if (ret =3D=3D -ENOSYS || ret =3D=3D -ENODEV) { > > + dwc->usb3_typec_phy =3D NULL; > > + } else if (ret =3D=3D -EPROBE_DEFER) { > > + return ret; > > + } else { > > + dev_err(dev, "no usb3 typeC phy, continuing without\n"); > > + dwc->usb3_typec_phy =3D NULL; > > + } > > + } > > + > > return 0; > > } >=20 > Thanks. That's a nice direction. btw, for typec, let's support only the new phy framework, that ought to get people to move :-) --=20 balbi --hcut4fGOf7Kh6EdG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU3QUeAAoJEIaOsuA1yqREK1kQAJL5ugAtuQgxvWQhXA/k7RZO F0hoRqjuZwq0b3uKcUoL5Ry6kSn8xStQ9wnS7b5S6kJNk90OZTLSsSmhIsiY7W3V 3NkutP+DNjTl6VXx5BHktt+W+pLOQtc9OZOCeUzmixxIqQ0p8ehgi3kydpKJHvZk 59CwOX354vsr2ioCxgNTHAawmmAGsgB/jAYTehQlwS4FPFJrneAimhn3qmEkrJuI vwmwpBGgLheWvOGIkIdkrDhsXsrfLv9DqIrIiWDxlJClyakwhG77RK4to9IiiXKy nHzaXVSEuoyvAop3nBxzA06bRjQFY8dAAzX8OJmyDoPWH7G41cNnjzpMJTvVVGLf gBujIu+z0S4zP++Eh7f0FNbhOPtLNHyhxB/l8sPITyZtbNoFE1ZiO/acYkVhgjVZ O4l1XkDknDUOfEfyg+HQ7AEGUaOu+pQkMOQ6Mmu8ZGRGbHkKiWVIRPpIsqHXPVuf 6fpccyDQz94j4tRDLwUxky/Jcff8Wh7aoNsHp0Qx/3f9d7lbJ82GOTd1tdghdqDn sIA0djSBIYCXyl5Rum6uJOB9tOoCg2++MFeghTdYIX54x2Vtn09yjfxU7pRVwGkv UZ1WN4yW1zD1wnssheaFehVXrr8MF87A3KR/AHtDifVeBXbT99vt3gi3zsTF84Ib aLm75cGWkNSvRhlNV+DT =HDu/ -----END PGP SIGNATURE----- --hcut4fGOf7Kh6EdG-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/