On Thu, May 20, 2010 at 05:15:30PM +0200, ext David Brownell wrote:
I think better remove .mode parameter from board_data if
its not needed anyways
But it *IS* needed, as I explained before...
if some board
supports only some specific mode they can select those
specifc config only.
No they can't. Recall that kernels are expected to run on
multiple boards. Which means that the same kernel should be
able to work correctly on a board with a peripheral-only USB
connector ... and on a board with an OTG connector. The way
to pass that information to the MUSB driver is through the
platform data. On the peripheral-only config the host code
won't kick in. On the OTG-enabled config, it will kick in
as needed (as will the peripheral mode). And so on.
If you were to rely on Kconfig options, then at least one of
those boards would work incorrectly. So that's not an option.
that's basically why I had made mode a parameter to usb_musb_init() so
boards could pass they're own configuration. We still have the Kconfig
to allow single board peripheral only defconfigs (line n900_defconfig)
to remove unnecessary code from the kernel.
--
balbi
DefectiveByDesign.org
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html