Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1592876
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Peter Chen <hzpeterchen@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v17 2/3] usb: USB Type-C connector class |
| Date | Mon, 06 Mar 2017 02:30:01 +0100 |
| Message-ID | <thPDj-ro-1@gated-at.bofh.it> (permalink) |
| References | <tdjC2-3LX-17@gated-at.bofh.it> <tdjC2-3LX-25@gated-at.bofh.it> <tgOzD-5ms-7@gated-at.bofh.it> <tgOzD-5ms-5@gated-at.bofh.it> <tgStA-8ce-23@gated-at.bofh.it> <tgWxd-2tg-45@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rFbPx9nNdhoMQ5NUnSBnoD2502v0kERg3PuAL0wwS2w=; b=pAj633gBg/0/XHS+GdKVj+kG3lVooFQoEP+FGXYO1vfITllM5nP1/Zqb8u0nna5lkz p08wQP3cTjrHI+NA+/QEBiR1NK6CxfsKTELDhbOzAApGBea5pkZ370n/8yY0uuhHp1I6 yZ2mA9OoTeTqTkxnBXeXB++RFqOjiChtvxCpsoBb1GXkbqtZmDiE32kTejjm1t2ztzok iHzR3AZa33InzsynY9US4IOU9HttebJciuudVae97gFImYK1Nm9t6s90/6DbnOsQXGpc vV79gE5UQwU2BFGmNC7L7j3/ZRt8YxFvOJ/ztp0lngF0WEAVpbOYENC9Ji4nPfhg4lGM aKMA== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rFbPx9nNdhoMQ5NUnSBnoD2502v0kERg3PuAL0wwS2w=; b=cwnjZDjO/CPWl65eocKZa0iw5w/tZWRja3Nr0kzmIWctOagwBEPdjJS+BOuaNNSJyy gVixJhOvCojvvTP2WmqepRwxSy+M95NQf1iR3YSP1If0TIKq44lk04mslHQwVbFc9fHB ap3Gv25VGPoPcF2jky2qJKYnRaQ+znFaUflOZRspuwS61mTR2TBoIVK5FbDbm3Wd5R0e Y9zBSDxyfyraXGVH16Z91j2VJGEDlNNEKzsk0Jcw8p3Z1rSRvRpsffTzm0dy0xinRrnh QIytE4YH9PFsVba0p2JjfmpdcwhaMsEXCIgv+0pxqt4hx2Fvon3ROgA6aalTBOvgXS0/ qNKw== |
| X-Gm-Message-State | AMke39lNSzTUeg55FfMmWfngKi5kPRlXzLauZBRT3TNT+1sk/9hsj9/5eWGaoztNLqngLA== |
| X-Received | by 10.99.24.88 with SMTP id 24mr17321778pgy.54.1488763506534; Sun, 05 Mar 2017 17:25:06 -0800 (PST) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.24 (2015-08-30) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 75 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Heikki Krogerus <heikki.krogerus@linux.intel.com>, Greg KH <gregkh@linuxfoundation.org>, Felipe Balbi <felipe.balbi@linux.intel.com>, Oliver Neukum <oneukum@suse.com>, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Roger Quadros <rogerq@ti.com>, Jun Li <jun.li@nxp.com> |
| X-Original-Date | Mon, 6 Mar 2017 09:24:51 +0800 |
| X-Original-Message-ID | <20170306012451.GB23305@b29397-desktop> |
| X-Original-References | <20170221142405.76299-1-heikki.krogerus@linux.intel.com> <20170221142405.76299-3-heikki.krogerus@linux.intel.com> <20170303033529.GA18650@b29397-desktop> <bbd1b0eb-7059-b72d-1fe4-27d9b5f84e0b@roeck-us.net> <20170303045246.GB18650@b29397-desktop> <992c2c82-d266-ca06-8e9a-b755fa358de4@roeck-us.net> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1592876 |
Show key headers only | View raw
On Fri, Mar 03, 2017 at 06:36:50AM -0800, Guenter Roeck wrote:
> On 03/02/2017 08:52 PM, Peter Chen wrote:
> >On Thu, Mar 02, 2017 at 08:29:07PM -0800, Guenter Roeck wrote:
> >>On 03/02/2017 07:35 PM, Peter Chen wrote:
> >>>On Tue, Feb 21, 2017 at 05:24:04PM +0300, Heikki Krogerus wrote:
> >>>>+/* --------------------------------------- */
> >>>>+/* Driver callbacks to report role updates */
> >>>>+
> >>>>+/**
> >>>>+ * typec_set_data_role - Report data role change
> >>>>+ * @port: The USB Type-C Port where the role was changed
> >>>>+ * @role: The new data role
> >>>>+ *
> >>>>+ * This routine is used by the port drivers to report data role changes.
> >>>>+ */
> >>>>+void typec_set_data_role(struct typec_port *port, enum typec_data_role role)
> >>>>+{
> >>>>+ if (port->data_role == role)
> >>>>+ return;
> >>>>+
> >>>>+ port->data_role = role;
> >>>>+ sysfs_notify(&port->dev.kobj, NULL, "data_role");
> >>>>+ kobject_uevent(&port->dev.kobj, KOBJ_CHANGE);
> >>>>+}
> >>>>+EXPORT_SYMBOL_GPL(typec_set_data_role);
> >>>>+
> >>>
> >>>Hi Keikki,
> >>>
> >>>Have you tested this interface with real dual-role controller/board?
> >>
> >>If it helps, my primary test system is a HP Chromebook 13 G1.
> >>
> >>>What interface you use when you receive this event to handle
> >>>dual-role switch? I am wonder if a common dual-role class is
> >>>needed, then we can have a common user utility.
> >>
> >>I don't really understand "What interface you use when you receive
> >>this event". Can you explain ?
> >>
> >
> >I mean "How to trigger kernel USB controller driver do role switch?"
> >
>
> I think this should be handled by the lower level driver. I am wide open
> to other ideas, though.
>
Would you show me how it works at your test system if it is not
a private thing?
> >>>
> >>>Eg, if "data_role" has changed, the udev can echo "data_role" to
> >>>/sys/class/usb-dual-role/role
> >>>
> >>That sounds like a kernel event delivered to user space via udev or
> >>sysfs notification and returned back into the kernel through a sysfs
> >>attribute. Do I understand that correctly ?
> >>
> >
> >Yes.
> >
>
> That doesn't sound like a good idea to me, and I don't see a technical reason
> to require it.
>
I don't like it either, but current kernel has no ability to handle it
except you use hardware signal like extcon-gpio or controller id as
input pin to SoC handle this event.
--
Best Regards,
Peter Chen
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v17 2/3] usb: USB Type-C connector class Guenter Roeck <linux@roeck-us.net> - 2017-03-03 07:10 +0100
Re: [PATCH v17 2/3] usb: USB Type-C connector class Peter Chen <hzpeterchen@gmail.com> - 2017-03-03 11:20 +0100
Re: [PATCH v17 2/3] usb: USB Type-C connector class Guenter Roeck <linux@roeck-us.net> - 2017-03-03 15:40 +0100
Re: [PATCH v17 2/3] usb: USB Type-C connector class Peter Chen <hzpeterchen@gmail.com> - 2017-03-06 02:30 +0100
csiph-web