Re: [PATCH v6 2/3] usb: dwc2/s3c-hsotg: move s3c-hsotg into dwc2 directory

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

 



On Mon, Apr 14, 2014 at 09:42:24PM +0000, Paul Zimmerman wrote:
> > From: Felipe Balbi [mailto:balbi@xxxxxx]
> > Sent: Monday, April 14, 2014 2:33 PM
> > 
> > On Mon, Apr 14, 2014 at 02:13:34PM -0700, Paul Zimmerman wrote:
> > > From: Dinh Nguyen <dinguyen@xxxxxxxxxx>
> > >
> > > Moves the s3c-hsotg driver into the dwc2 directory and uses the
> > > dwc2 defines in hw.h. Renames s3c-hsotg.c to gadget.c.
> > >
> > > NOTE: You can build both host and peripheral as a dynamically
> > > linked module, but be aware that if you insmod dwc2_gadget, then
> > > rmmod it, then insmod dwc2 and dwc2_platform for host mode, this
> > > will not work. As the step to rmmod dwc2_gadget.ko will turn off
> > > the clock to the USB IP. The dwc2 host driver currently does not
> > > look to turn on a clock yet. A patch to fix that will be coming
> > > soon.
> > >
> > > Signed-off-by: Dinh Nguyen <dinguyen@xxxxxxxxxx>
> > > [ jh,rb - For gadget part only: ]
> > > Tested-by: Jingoo Han <jg1.han@xxxxxxxxxxx>
> > > Tested-by: Robert Baldyga <r.baldyga@xxxxxxxxxxx>
> > > [ pz: Folded Kconfig/Makefile changes, which were originally in
> > >   a separate patch, into this one, to avoid a build breakage.
> > >   Modified Kconfig/Makefile changes a bit. Tested host part only. ]
> > > Signed-off-by: Paul Zimmerman <paulz@xxxxxxxxxxxx>
> > > ---
> > >  drivers/usb/dwc2/Kconfig                          |  61 +++-
> > >  drivers/usb/dwc2/Makefile                         |  37 +-
> > >  drivers/usb/{gadget/s3c-hsotg.c => dwc2/gadget.c} | 415 +++++++++++-----------
> > >  drivers/usb/gadget/Kconfig                        |   6 -
> > >  drivers/usb/gadget/Makefile                       |   1 -
> > >  drivers/usb/gadget/s3c-hsotg.h                    | 378 --------------------
> > >  6 files changed, 273 insertions(+), 625 deletions(-)
> > >  rename drivers/usb/{gadget/s3c-hsotg.c => dwc2/gadget.c} (91%)
> > >  delete mode 100644 drivers/usb/gadget/s3c-hsotg.h
> > >
> > > diff --git a/drivers/usb/dwc2/Kconfig b/drivers/usb/dwc2/Kconfig
> > > index be947d6..f93807b 100644
> > > --- a/drivers/usb/dwc2/Kconfig
> > > +++ b/drivers/usb/dwc2/Kconfig
> > > @@ -1,25 +1,58 @@
> > >  config USB_DWC2
> > > -	tristate "DesignWare USB2 DRD Core Support"
> > > +	bool "DesignWare USB2 DRD Core Support"
> > 
> > why this change to bool ? Seems unrelated. Other than that, for gadget:
> 
> Because now there are two drivers under this, either of which can be
> built-in or modular. So a tristate here doesn't make sense any more.

we still use tristate with dwc3 (I removed some dependencies and help
text to make it easier to read):

config USB_DWC3
	tristate "DesignWare USB3 DRD Core Support"

if USB_DWC3

choice
	bool "DWC3 Mode Selection"
	default USB_DWC3_DUAL_ROLE if (USB && USB_GADGET)
	default USB_DWC3_HOST if (USB && !USB_GADGET)
	default USB_DWC3_GADGET if (!USB && USB_GADGET)

config USB_DWC3_HOST
	bool "Host only mode"
	depends on USB=y || USB=USB_DWC3

config USB_DWC3_GADGET
	bool "Gadget only mode"
	depends on USB_GADGET=y || USB_GADGET=USB_DWC3

config USB_DWC3_DUAL_ROLE
	bool "Dual Role mode"
	depends on ((USB=y || USB=USB_DWC3) && (USB_GADGET=y || USB_GADGET=USB_DWC3))

endchoice

comment "Platform Glue Driver Support"

config USB_DWC3_OMAP
	tristate "Texas Instruments OMAP5 and similar Platforms"

config USB_DWC3_EXYNOS
	tristate "Samsung Exynos Platform"

config USB_DWC3_PCI
	tristate "PCIe-based Platforms"

comment "Debugging features"

config USB_DWC3_DEBUG
	bool "Enable Debugging Messages"

config USB_DWC3_VERBOSE
	bool "Enable Verbose Debugging Messages"

endif

I think this can be replicated on dwc2 as well, no strong feelings
except that it would be good to mention in commmit log because it looks
like an unrelated change ;-)

cheers

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux