Re: [PATCH 4/4] omap: musb: introduce default baord config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 27, 2011 at 12:23:18AM -0400, Oleg Drokin wrote:
> Hello!
> 
> On Apr 24, 2011, at 6:09 PM, Mike Rapoport wrote:
> > -void __init usb_musb_init(struct omap_musb_board_data *board_data)
> > +static struct omap_musb_board_data musb_default_board_data = {
> > +	.interface_type		= MUSB_INTERFACE_ULPI,
> > +	.mode			= MUSB_OTG,
> 
> In fact can you make it more generic with ifdefs like this?
> (since there are tons of boards taht are client only or would like to be compiled in some other way):
> 
> +#ifdef CONFIG_USB_MUSB_OTG
> +       .mode                   = MUSB_OTG,
> +#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
> +       .mode                   = MUSB_HOST,
> +#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
> +       .mode                   = MUSB_PERIPHERAL,
> +#endif

If this is something that's desired, then it should not be done via ifdefs
but by platforms passing the mode argument into an initialization function.
Eventually, when we switch to some DT like system, this is the kind of
information that would be obtained from DT, and identifying this stuff
now will help when DT stuff comes along.
--
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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux