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

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

 



On Thu, Apr 28, 2011 at 12:21:47PM -0400, Oleg Drokin wrote:
> Frankly, I am not even sure why the mode needs to be supplied by the board at all.
> The musb code already  has a very similar switch in musb_plat and so it totally looks like
> a duplicated specification of the same thing from the board file and from
> generic musb code where the original init value is then ignored.
> 
> I see that in .29 the board file did not need to specify usb mode and it was all decided
> in musb-specific code, and I have no idea why that was later changed to the way it is now.
> 
> Would it just be better if a patch removing mode field from struct omap_musb_board_data
> is adopted like this (warning - not a real patch)?

Hmm, it looks to me like we're ending up with two layers on top of
each other, both trying to provide some kind of generic board interface.

I think they should be squashed together.  And that:

static struct musb_hdrc_platform_data musb_plat = {
#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

in usb-musb.c needs the same treatment as I mentioned in the previous
message if it really is board specific.  If not, I see no reason why
the above can't go into the musb driver itself.
--
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