Roman Zippel wrote: > Hi, > > On Mon, 29 Dec 2003, David Brownell wrote: > >> How about using this approach instead? It simplifies the kconfig >> for the gadget drivers .. > > There are some strange things in there. Some of it was to kick the menu layout heuristic into something closer to sanity. There was also baggage from less-successful attempts to make the configuration behave right. > choice values can also be tristate symbols, so you wouldn't need the > separate defines, unless you really always want to compile only a single > controller (even as module). That's it precisely. USB devices have only one (upstream) link; they're not like hosts. And its link to the controller isn't re-wired on the fly any more than, say, the MMU. Kconfig just needed some persuasion before it'd dance that way. > The "default m if USB_GADGET = m" looks weird, if I understand them > correctly this should just be "depends on USB_GADGET", e.g. > > config USB_NET2280 > tristate > depends on USB_GADGET > default USB_GADGET_NET2280 > > this would also fix the menu structure and the drivers menu would appear > below the gadget option. More like config USB_GOKU tristate depends on USB_GADGET_GOKU default USB_GADGET And similar for net2280, pxa2xx, and so on. Either that, or moving it up higher in the text file, seems to have been the black magic that made the menu layout code behave. > I'm also not sure about USB_PXA2XX_SMALL, as it also can be written as: > > config USB_PXA2XX_SMALL > depends on USB_PXA2XX = y > default USB_ZERO = y || USB_ETH = y || USB_G_SERIAL > > is this really intended? I'm not sure what you're asking. I wrote it with one line per driver that's less error-prone in case updates get merged. The latest version is more terse, but there are lots of ways to write that kind of logic. > The dependency "USB_DUMMY_HCD || USB_NET2280 || USB_PXA2XX || USB_SA1100 > || USB_GOKU" can be basically reduced to "USB_GADGET". > >> Roman, this seems to trigger some kind of xconfig/menuconfig bug, >> since I can go down the list of hardware options (net2280, goku, >> dummy -- three, not the single one Adrian was working with) and >> each deselects the previous selection ... but then it's impossible >> to turn off the dummy, and select real hardware. > > > I can't reproduce this, it works fine here. Reproduced it again here today, with a reasonably current 2.6.1 tree on top of RH9 (plus some updated RPMs from RH). It's there in gconfig too. The workaround is "vi .config" and delete the sticky DUMMY_HCD entry, then re-configure. - Dave > bye, Roman >