diff options
author | Daniel Mack <zonque@gmail.com> | 2013-04-10 15:55:46 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-05-28 12:22:23 -0400 |
commit | b7b741ea38a32336b45870b76aaec1abe57badd0 (patch) | |
tree | 10d48d17c988e5f6b6743bd3d6eb97f9bc0e0679 /drivers/usb/musb/Kconfig | |
parent | 74c2e93600581d80695604126a3725a157d0ab72 (diff) |
usb: musb: add Kconfig options for HOST, GAGDET or DUAL_ROLE modes
This makes building the actual object files optional to the selected
mode, which saves users who know which kind of USB mode support they
need some binary size.
Unimplemented functions are stubbed out with static inline functions.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/Kconfig')
-rw-r--r-- | drivers/usb/musb/Kconfig | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index 06f8d29af1ef..797e3fd45510 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig | |||
@@ -28,6 +28,35 @@ config USB_MUSB_HDRC | |||
28 | if USB_MUSB_HDRC | 28 | if USB_MUSB_HDRC |
29 | 29 | ||
30 | choice | 30 | choice |
31 | bool "MUSB Mode Selection" | ||
32 | default USB_MUSB_DUAL_ROLE if (USB && USB_GADGET) | ||
33 | default USB_MUSB_HOST if (USB && !USB_GADGET) | ||
34 | default USB_MUSB_GADGET if (!USB && USB_GADGET) | ||
35 | |||
36 | config USB_MUSB_HOST | ||
37 | bool "Host only mode" | ||
38 | depends on USB | ||
39 | help | ||
40 | Select this when you want to use MUSB in host mode only, | ||
41 | thereby the gadget feature will be regressed. | ||
42 | |||
43 | config USB_MUSB_GADGET | ||
44 | bool "Gadget only mode" | ||
45 | depends on USB_GADGET | ||
46 | help | ||
47 | Select this when you want to use MUSB in gadget mode only, | ||
48 | thereby the host feature will be regressed. | ||
49 | |||
50 | config USB_MUSB_DUAL_ROLE | ||
51 | bool "Dual Role mode" | ||
52 | depends on (USB && USB_GADGET) | ||
53 | help | ||
54 | This is the default mode of working of MUSB controller where | ||
55 | both host and gadget features are enabled. | ||
56 | |||
57 | endchoice | ||
58 | |||
59 | choice | ||
31 | prompt "Platform Glue Layer" | 60 | prompt "Platform Glue Layer" |
32 | 61 | ||
33 | config USB_MUSB_DAVINCI | 62 | config USB_MUSB_DAVINCI |