RE: [PATCH v7 1/5] usb: phy: add usb phy notify port status API

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

 



Hi Greg,

> > > > > +
> > > > > +     if (!ret) {
> > > > > +             struct usb_device *hdev = hub->hdev;
> > > > > +
> > > > > +             if (hdev && !hdev->parent) {
> > > >
> > > > Why the check for no parent?  Please document that here in a
> comment.
> > >
> > > I will add a comment :
> > > /* Only notify roothub. That is, when hdev->parent is empty. */
> >
> > Also document this that this will only happen for root hub status
> > changes, that's not obvious in the callback name or documentation or
> anywhere else here.
> 
> All usb phy notifications (connection, disconnection) are only for roothub.
> So I don't special to doc this.

I will add the comment:
/*
 * Applies to roothub only. That is, when hdev->parent is
 * empty. Only the roothub will be notified of port state
 * changes, since the USB PHY only cares about changes at
 * the next level.
 */


Thanks,
Stanley




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux