Le 26/03/2013 20:04, Alan Stern a écrit :
On Tue, 26 Mar 2013, Florian Fainelli wrote:
This patch removes the depends on USB from all config symbols in
drivers/usb/host/Kconfig and replace that with an if USB / endif block
as suggested by Alan Stern.
I'm afraid this patch is filled with errors.
Which is the reason why I stated this was a RFC, I did not meant to get
it good for everything from the first try.
For one thing, it doesn't appreciate the difference between host-side
USB and device-side USB. CONFIG_USB describes support for the
host-side part of the stack, whereas CONFIG_USB_GADGET describes
support for the device-side (or gadget-side) part. This means you must
not make things like drivers/usb/gadget/Kconfig dependent on
CONFIG_USB.
Ok.
For another, the patch doesn't understand the difference between && and
||. As an example, putting chipidea/Kconfig inside "if USB" and then
doing this:
--- 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_GADGET
help
Say Y here if your system has a dual role high speed USB
controller based on ChipIdea silicon IP. Currently, only the
effectively changes the || to an &&. This is not what we want.
You need to be a lot more careful about the distinction between hosts
and gadgets. The situation becomes even more complicated when you
realize that some of the code applies to Dual-Role Devices, which can
be either hosts or gadgets (this includes OTG). In addition, there are
a few things (such as gadget/dummy_hcd.c) which require _both_
host-side and device-side support.
Ok, thanks for the hint, I will address these issues.
--
Florian
--
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