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:   Wed, 23 Oct 2019 11:26:03 +0800
From:   Puma Hsu <pumahsu@...gle.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Badhri Jagan Sridharan <badhri@...gle.com>,
        Kyle Tso <kyletso@...gle.com>,
        Albert Wang <albertccwang@...gle.com>,
        Chien Kun Niu <rickyniu@...gle.com>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] usb: typec: Add sysfs node to show connector orientation

Hi Greg,


On Wed, Oct 23, 2019 at 1:27 AM Greg KH <gregkh@...uxfoundation.org> wrote:
>
> 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@...gle.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@...ux.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@...gle.com>
> > +Description:
> > +             Indicates which typec connector orientation is configured now.
> > +             cc1 is defined as "normal" and cc2 is defined as "reversed".
>
> Why the blank line after "Description:"?  Shouldn't "Indicates..." be
> right after it?

I checked the coding style for sysfs-class-*, all of them put the
description at the next line behind "Description:"
Should I change it?

> > +
> > +             Valid value:
> > +             - unknown (nothing configured)
> > +             - normal (configured in cc1 side)
> > +             - reversed (configured in cc2 side)
> >
> >  USB Type-C partner devices (eg. /sys/class/typec/port0-partner/)
> >
> > diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> > index 94a3eda62add..911d06676aeb 100644
> > --- a/drivers/usb/typec/class.c
> > +++ b/drivers/usb/typec/class.c
> > @@ -1245,6 +1245,23 @@ static ssize_t usb_power_delivery_revision_show(struct device *dev,
> >  }
> >  static DEVICE_ATTR_RO(usb_power_delivery_revision);
> >
> > +static const char * const typec_connector_orientation[] = {
> > +     [TYPEC_ORIENTATION_NONE]                = "unknown",
> > +     [TYPEC_ORIENTATION_NORMAL]              = "normal",
> > +     [TYPEC_ORIENTATION_REVERSE]             = "reversed",
> > +};
> > +
> > +static ssize_t connector_orientation_show(struct device *dev,
> > +                                             struct device_attribute *attr,
> > +                                             char *buf)
>
> Can you line this up properly?

Yes, I will update it in version3 once the previous problem is confirmed.

>
> thanks,
>
> greg k-h


Thanks in advance.
Puma Hsu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ