Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1472556

Re: [PATCHv6 1/3] usb: USB Type-C connector class

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: [PATCHv6 1/3] usb: USB Type-C connector class
Date 2016-08-30 17:30 +0200
Message-ID <sbT97-6Di-15@gated-at.bofh.it> (permalink)
References (5 earlier) <sbuu5-7IC-21@gated-at.bofh.it> <sbv6N-7Wm-13@gated-at.bofh.it> <sbvzP-8mr-7@gated-at.bofh.it> <sbB2y-3pN-19@gated-at.bofh.it> <sbMAG-2mW-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello Heikki,

On Tue, Aug 30, 2016 at 11:22:27AM +0300, Heikki Krogerus wrote:
> > 
> > If you are only interested in accessory mode support, maybe we don't need
> > the 'type' attribute at all. We could make the 'accessory' attribute always
> > visible and display one of "none", "Audio", "Debug", or "Digital Audio".
> > It might also make sense to rename the attribute to "accessory_mode".
> 
> That works for me.
> 
> How about if I add the "supports_usb_power_delivery" attribute for the
> partners instead to give some details about them. Any objections?
> 
At first glance, the attribute name looks a bit awkward. Let me look
into the specification to see what might make sense to report. On top of my
head, I don't recall if we are able to report this for a dock which isn't
currently connected to power.

> > On a side note, while looking into this, I noticed the following:
> > 
> > +       if (port->cap->accessory)
> > +               for (accessory = port->cap->accessory, i = 0;
> > +                    i < port->cap->num_accessory; accessory++, i++)
> > +                       ret += sprintf(buf, "%s\n",
> > +                                      typec_accessory_modes[*accessory]);
> > 
> > This means the list of supported accessories always starts with ", ".
> 
> Where does it print ", "?
> 
> I'm not sure what is wrong here, but I'll update this code in any

Nothing. Looks like I lost my ability to read code. Somehow the ',' above made
it into the string. There is some inconsistency in the output when compared to
the other "supported" attributes, though. Here the supported modes are printed
in consecutive lines; elsewhere they are printed in a single line with ',' as
separator.

Thanks,
Guenter

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCHv6 1/3] usb: USB Type-C connector class Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2016-08-25 14:10 +0200
  Re: [PATCHv6 1/3] usb: USB Type-C connector class Vincent Palatin <vpalatin@chromium.org> - 2016-08-26 15:20 +0200
    Re: [PATCHv6 1/3] usb: USB Type-C connector class Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2016-08-26 16:20 +0200
      Re: [PATCHv6 1/3] usb: USB Type-C connector class Guenter Roeck <linux@roeck-us.net> - 2016-08-29 15:10 +0200
        Re: [PATCHv6 1/3] usb: USB Type-C connector class Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2016-08-29 15:50 +0200
          Re: [PATCHv6 1/3] usb: USB Type-C connector class Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2016-08-29 16:20 +0200
            Re: [PATCHv6 1/3] usb: USB Type-C connector class Guenter Roeck <linux@roeck-us.net> - 2016-08-29 22:10 +0200
              Re: [PATCHv6 1/3] usb: USB Type-C connector class Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2016-08-30 10:30 +0200
                Re: [PATCHv6 1/3] usb: USB Type-C connector class Guenter Roeck <linux@roeck-us.net> - 2016-08-30 17:30 +0200
                Re: [PATCHv6 1/3] usb: USB Type-C connector class Guenter Roeck <linux@roeck-us.net> - 2016-08-30 19:10 +0200

csiph-web