RE: [PATCH v5 01/11] usb: musb: add musb->id to identify core instance

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

 



Hi,
> On Wed, Jul 25, 2012 at 12:30:12PM +0000, Gupta, Ajay Kumar wrote:
> > Hi,
> > > On Wed, Jul 25, 2012 at 12:19:32PM +0000, Gupta, Ajay Kumar wrote:
> > > > Hi,
> > > > >
> > > > > On Wed, Jul 25, 2012 at 05:37:19PM +0530, Ajay Kumar Gupta wrote:
> > > > > > diff --git a/drivers/usb/musb/musb_core.c
> > > > > > b/drivers/usb/musb/musb_core.c index 89d1871..f5eb8a7 100644
> > > > > > --- a/drivers/usb/musb/musb_core.c
> > > > > > +++ b/drivers/usb/musb/musb_core.c
> > > > >
> > > > > <snip>
> > > > >
> > > > > > @@ -1889,6 +1921,7 @@ musb_init_controller(struct device *dev,
> > > > > > int nIrq,
> > > > > void __iomem *ctrl)
> > > > > >  	pm_runtime_enable(musb->controller);
> > > > > >
> > > > > >  	spin_lock_init(&musb->lock);
> > > > > > +	musb->id = pdev->id;
> > > > >
> > > > > I fail to see where this musb->id would be used. Care to clarify ?
> > > >
> > > > Sure, It is used in musb_init_debugfs(). Please refer 02/11.
> > >
> > > Then it's a bit unnecessary right ?
> > >
> > > You can change the directory name to dev_name(musb->controller) as
> > > that will already have the id appended to it.
> >
> > Well, musb->id is used at many more places and it has to be there.
> > Please refer
> >
> > 01/11 where all glue layers using it for:
> > +       musb_put_id(&pdev->dev, glue->musb->id);

Here glue->musb is a platform_device and not "struct musb". So it's limited
at glue layer alone. All IDs are being saved in each pdev->id. We have two
musb instances and so we have glue->musb[2] pdevs and so each IDs getting saved
at glue->musb[0]->id and glue->musb[1]->id.

How about musb->id (I mean struct musb here) uses at other places?

03/11 where musb dsps glue is extensively using it at multiple places.
04/11 where all glue using if they need nop.

Ajay
> 
> your struct *_glue{}; should be the one holding the ID as it's the one who
> requested it. If you request multiple IDs, you hold multiple IDs (glue->id0,
> glue->id1, glue->idN) and so on.


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


[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