Re: [RFC PATCHv3] usb: USB Type-C Connector Class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 11, 2016 at 09:05:46AM +0200, Oliver Neukum wrote:
> On Fri, 2016-06-10 at 17:34 +0300, Heikki Krogerus wrote:
> > +static ssize_t
> > +preferred_role_store(struct device *dev, struct device_attribute
> > *attr,
> > +                    const char *buf, size_t size)
> > +{
> > +       struct typec_port *port = to_typec_port(dev);
> > +       enum typec_role role;
> > +       int ret;
> > +
> > +       mutex_lock(&port->lock);
> > +
> > +       if (port->cap->type != TYPEC_PORT_DRP) {
> > +               dev_dbg(dev, "Try.SRC/SNK only supported with DRP
> > ports\n");
> > +               ret = -EOPNOTSUPP;
> > +               goto out;
> > +       }
> 
> I think Try.SNK with an UFP should fail differently from
> Try.SRC and vice versa.
> 
> And, even more importantly, this offeres no way to cancel
> a preference.

Well, no way that would actually work. I'll fix that.

Thanks,

-- 
heikki
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux