RE: [PATCHv8 12/19] usb: otg: twl6030: Start using struct usb_otg

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

 



> On Mon, Dec 12, 2011 at 09:30:58AM +0200, Heikki Krogerus wrote:
> > Hi,
> >
> > On Mon, Dec 12, 2011 at 11:27:58AM +0530, ABRAHAM, KISHON VIJAY wrote:
> > > > diff --git a/drivers/usb/otg/twl6030-usb.c
> b/drivers/usb/otg/twl6030-usb.c
> > > > index 2f5c299..3441738 100644
> > > > --- a/drivers/usb/otg/twl6030-usb.c
> > > > +++ b/drivers/usb/otg/twl6030-usb.c
> > > > @@ -87,7 +87,8 @@
> > > >  #define        VBUS_DET                        BIT(2)
> > > >
> > > >  struct twl6030_usb {
> > > > -       struct usb_phy  otg;
> > > > +       struct usb_phy          phy;
> > > > +       struct usb_otg          otg;
> > > I see otg being added to  twl6030_usb (changes from v7). Whats the
> > > reason behind this?
> > > I think its better to have it in the way you had in v7.
> >
> > Felipe felt there is no reason for the drivers to need to allocate the
> > structure. That is why I changed it.
> 
> Yeah, but what I meant by that is that struct usb_phy would have a
> struct usb_otg field, not just a pointer to struct usb_otg. Something
> like:
> 
> struct usb_otg {
> 	unsigned a,b,c;
> };
> 
> struct usb_phy {
> 	struct usb_otg otg;
> };

Why there needs struct usb_otg at struct usb_phy?
>From my point, at general otg driver, it doesn't need to touch phy.
The phy are only needed to operated at vendor's otg driver.
So, I don't know why below is not ok:

>  struct twl6030_usb {
> > > > +       struct usb_phy          phy;
> > > > +       struct usb_otg          otg;  
 
struct usb_otg {
	unsigned otg_specific;

> 
struct otg_phy {
	unsigned phy_specific;
}

Besides, for some SoCs, there is no otg driver at mainline until now, but
they need to get usb_phy.

> --
> balbi

--
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