1 From a0cfdc6bc73bc47b63b05b850cf66cf67f2487bf Mon Sep 17 00:00:00 2001
2 From: Lothar Waßmann <LW@KARO-electronics.de>
3 Date: Wed, 14 Aug 2013 12:43:58 +0300
4 Subject: [PATCH] usb: chipidea: improve kconfig 2.0
6 This patch provides a cleaner solution to the problem described in
7 commit 20a677fd ("usb: chipidea: improve kconfig").
9 The goal to be achieved is to force USB_CHIPIDEA=m if either
10 USB_EHCI_HCD=m or USB_GADGET=m.
11 If both are 'y' USB_CHIPIDEA may be selected to be 'm' or 'y'.
13 The old patch had the drawback, that USB_CHIPIDEA could be chosen as
14 'y' though USB_EHCI_HCD or USB_GADGET (or both) were 'm' leading to a
15 situation where USB_CHIPIDEA_HOST or USB_CHIPIDEA_UDC vanished from
16 the config options producing a compilable but dysfunctional driver.
18 Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
19 Reviewed-by: Peter Chen <peter.chen@freescale.com>
20 Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 drivers/usb/chipidea/Kconfig | 7 +++----
24 1 file changed, 3 insertions(+), 4 deletions(-)
26 --- a/drivers/usb/chipidea/Kconfig
27 +++ b/drivers/usb/chipidea/Kconfig
30 tristate "ChipIdea Highspeed Dual Role Controller"
31 - depends on USB || USB_GADGET
32 + depends on (USB_EHCI_HCD && USB_GADGET) || (USB_EHCI_HCD && !USB_GADGET) || (!USB_EHCI_HCD && USB_GADGET)
34 Say Y here if your system has a dual role high speed USB
35 controller based on ChipIdea silicon IP. Currently, only the
36 @@ -12,15 +12,14 @@ if USB_CHIPIDEA
38 config USB_CHIPIDEA_UDC
39 bool "ChipIdea device controller"
40 - depends on USB_GADGET=y || (USB_CHIPIDEA=m && USB_GADGET=m)
41 + depends on USB_GADGET
43 Say Y here to enable device controller functionality of the
46 config USB_CHIPIDEA_HOST
47 bool "ChipIdea host controller"
49 - depends on USB_EHCI_HCD=y || (USB_CHIPIDEA=m && USB_EHCI_HCD=m)
50 + depends on USB_EHCI_HCD
51 select USB_EHCI_ROOT_HUB_TT
53 Say Y here to enable host controller functionality of the