Re: [PATCH v5 04/11] usb: otg: nop: add support for multiple tranceiver

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

 



On Thu, Jul 26, 2012 at 08:29:06AM +0000, Gupta, Ajay Kumar wrote:
> Hi,
> > On Thu, Jul 26, 2012 at 08:22:35AM +0000, Gupta, Ajay Kumar wrote:
> > > > > @@ -408,7 +408,7 @@ static int am35x_musb_exit(struct musb *musb)
> > > > >  		data->set_phy_power(0);
> > > > >
> > > > >  	usb_put_phy(musb->xceiv);
> > > > > -	usb_nop_xceiv_unregister();
> > > > > +	usb_nop_xceiv_unregister(musb->xceiv);
> > > >
> > > > Dude, this is so wrong... You don't know if there are other users of
> > > > the nop xceiv in the system. If there are other users which already
> > > > have claimed id 0, you will try to create duplicated directories under
> > sysfs.
> > > > MUSB's ID has nothing to do with NOP's ID.
> > >
> > > I could not understood this comment as I am not using id. Please clarify.
> > 
> > sorry, my bad. I put the comment on the wrong hunk:
> > 
> > > > > @@ -364,7 +364,7 @@ static int am35x_musb_init(struct musb *musb)
> > > > >  	if (!rev)
> > > > >  		return -ENODEV;
> > > > >
> > > > > -	usb_nop_xceiv_register();
> > > > > +	usb_nop_xceiv_register(musb->id);
> > > > >  	musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
> > > > >  	if (IS_ERR_OR_NULL(musb->xceiv))
> > > > >  		return -ENODEV;
> > 
> > here. You pass musb->id to become NOP's ID.
> 
> Got this, so something like musb_ida is needed even for NOP. Right?

that's correct. But I guess you can avoid nop_get_id() and build that
into nop_register and nop_unregister() calls, so that the changes are
local to nop xceiv only.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux