Re: [PATCH 1/4] usb: chipidea: improve kconfig 2.0

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

 



On Wed, Jul 31, 2013 at 04:21:13PM +0200, Lothar Waßmann wrote:
> This patch provides a cleaner solution to the problem described in
> commit 20a677fd.
> 
> The goal to be achieved is to force USB_CHIPIDEA=m if either
> USB_EHCI_HCD=m or USB_GADGET=m.
> If both are 'y' USB_CHIPIDEA may be selected to be 'm' or 'y'.
> 
> The old patch had the drawback, that USB_CHIPIDEA could be chosen as
> 'y' though USB_EHCI_HCD or USB_GADGET (or both) were 'm' leading to a
> situation where USB_CHIPIDEA_HOST or USB_CHIPIDEA_UDC vanished from
> the config options producing a compilable but dysfunctional driver.
> 
> Signed-off-by: Lothar Waßmann <LW@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/usb/chipidea/Kconfig |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig
> index d1bd8ef..4a851e1 100644
> --- a/drivers/usb/chipidea/Kconfig
> +++ b/drivers/usb/chipidea/Kconfig
> @@ -1,6 +1,6 @@
>  config USB_CHIPIDEA
>  	tristate "ChipIdea Highspeed Dual Role Controller"
> -	depends on USB || USB_GADGET
> +	depends on (USB_EHCI_HCD && USB_GADGET) || (USB_EHCI_HCD && !USB_GADGET) || (!USB_EHCI_HCD && USB_GADGET)
>  	help
>  	  Say Y here if your system has a dual role high speed USB
>  	  controller based on ChipIdea silicon IP. Currently, only the
> @@ -12,15 +12,14 @@ if USB_CHIPIDEA
>  
>  config USB_CHIPIDEA_UDC
>  	bool "ChipIdea device controller"
> -	depends on USB_GADGET=y || (USB_CHIPIDEA=m && USB_GADGET=m)
> +	depends on USB_GADGET
>  	help
>  	  Say Y here to enable device controller functionality of the
>  	  ChipIdea driver.
>  
>  config USB_CHIPIDEA_HOST
>  	bool "ChipIdea host controller"
> -	depends on USB=y
> -	depends on USB_EHCI_HCD=y || (USB_CHIPIDEA=m && USB_EHCI_HCD=m)
> +	depends on USB_EHCI_HCD
>  	select USB_EHCI_ROOT_HUB_TT
>  	help
>  	  Say Y here to enable host controller functionality of the
> -- 

Reviewed-by: Peter Chen <peter.chen@xxxxxxxxxxxxx>

Hi Alex,

Lothar's solution is better than mine, please forget mine:
http://marc.info/?l=linux-usb&m=137331577104110&w=2

After you apply Lothar's patch, please also apply mine fixup
ehci host's config patch
http://marc.info/?l=linux-usb&m=137331577404223&w=2

-- 

Best Regards,
Peter Chen

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