From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Puma Hsu <pumahsu@google.com>,
gregkh@linuxfoundation.org, badhri@google.com,
kyletso@google.com, albertccwang@google.com, rickyniu@google.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] usb: typec: Add sysfs node to show connector orientation
Date: Wed, 23 Oct 2019 17:29:00 +0300 [thread overview]
Message-ID: <20191023142900.GA15396@kuha.fi.intel.com> (raw)
In-Reply-To: <644d890b-86e8-f05a-cd4c-32937d971a45@roeck-us.net>
On Wed, Oct 23, 2019 at 06:44:39AM -0700, Guenter Roeck wrote:
> On 10/23/19 1:32 AM, Heikki Krogerus wrote:
> > +Guenter
> >
> > On Tue, Oct 22, 2019 at 04:59:24PM +0800, Puma Hsu wrote:
> > > Export the Type-C connector orientation so that user space
> > > can get this information.
> > >
> > > Signed-off-by: Puma Hsu <pumahsu@google.com>
> > > ---
> > > Documentation/ABI/testing/sysfs-class-typec | 11 +++++++++++
> > > drivers/usb/typec/class.c | 18 ++++++++++++++++++
> > > 2 files changed, 29 insertions(+)
> > >
> > > diff --git a/Documentation/ABI/testing/sysfs-class-typec b/Documentation/ABI/testing/sysfs-class-typec
> > > index d7647b258c3c..b22f71801671 100644
> > > --- a/Documentation/ABI/testing/sysfs-class-typec
> > > +++ b/Documentation/ABI/testing/sysfs-class-typec
> > > @@ -108,6 +108,17 @@ Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > > Description:
> > > Revision number of the supported USB Type-C specification.
> > > +What: /sys/class/typec/<port>/connector_orientation
> > > +Date: October 2019
> > > +Contact: Puma Hsu <pumahsu@google.com>
> > > +Description:
> > > + Indicates which typec connector orientation is configured now.
> > > + cc1 is defined as "normal" and cc2 is defined as "reversed".
> > > +
> > > + Valid value:
> > > + - unknown (nothing configured)
> >
> > "unknown" means we do not know the orientation.
> >
> > > + - normal (configured in cc1 side)
> > > + - reversed (configured in cc2 side)
> >
> > Guenter, do you think "connector_orientation" OK. I proposed it, but
> > I'm now wondering if something like "polarity" would be better?
> >
>
> Yes, or just "orientation". I don't see the value in the "connector_" prefix.
> I also wonder if "unknown" is really correct. Is it really unknown, or
> does it mean that the port is disconnected ?
Unknown means we don't know the orientation. We don't always have that
information available to us. With UCSI we simply do not know it.
I think this file needs to be hidden after all if we don't know the
cable plug orientation.
How about empty string instead of "unknown"?
thanks,
--
heikki
next prev parent reply other threads:[~2019-10-23 14:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 8:59 [PATCH V2] usb: typec: Add sysfs node to show connector orientation Puma Hsu
2019-10-22 17:27 ` Greg KH
2019-10-23 3:26 ` Puma Hsu
2019-10-23 8:32 ` Heikki Krogerus
2019-10-23 13:44 ` Guenter Roeck
2019-10-23 13:53 ` Puma Hsu
2019-10-23 14:29 ` Heikki Krogerus [this message]
2019-10-23 15:01 ` Guenter Roeck
2019-10-23 15:57 ` Heikki Krogerus
2019-10-24 9:02 ` Puma Hsu
2019-10-24 12:06 ` Heikki Krogerus
2019-10-25 6:46 ` Puma Hsu
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=20191023142900.GA15396@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=albertccwang@google.com \
--cc=badhri@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kyletso@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pumahsu@google.com \
--cc=rickyniu@google.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