From: Felipe Balbi <balbi@ti.com>
To: David Cohen <david.a.cohen@linux.intel.com>
Cc: <balbi@ti.com>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <yousaf.kaukab@intel.com>,
<nirmala.bailur@intel.com>
Subject: Re: [RFC] USB phy type C
Date: Thu, 12 Feb 2015 12:45:53 -0600 [thread overview]
Message-ID: <20150212184553.GE31034@saruman.tx.rr.com> (raw)
In-Reply-To: <20150212184137.GA21337@psi-dev26.jf.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-02-12 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-12 18:41 David Cohen
2015-02-12 18:45 ` Felipe Balbi [this message]
2015-02-12 19:27 ` David Cohen
2015-02-12 19:55 ` Felipe Balbi
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=20150212184553.GE31034@saruman.tx.rr.com \
--to=balbi@ti.com \
--cc=david.a.cohen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nirmala.bailur@intel.com \
--cc=yousaf.kaukab@intel.com \
/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
Powered by JetHome