[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-usb
Subject:    Re: [PATCH v2 2/2] ARM : OMAP4 : MUSB : Add USB support to 4430
From:       Olof Johansson <olof () lixom ! net>
Date:       2009-12-30 17:06:48
Message-ID: 20091230170648.GA7017 () lixom ! net
[Download RAW message or body]

Hi,

On Wed, Dec 30, 2009 at 07:56:38PM +0530, Maulik Mankad wrote:

> --- felipe_musb.orig/arch/arm/mach-omap2/board-4430sdp.c
> +++ felipe_musb/arch/arm/mach-omap2/board-4430sdp.c
> @@ -73,11 +75,21 @@ static void __init omap_4430sdp_init_irq
>  	omap_gpio_init();
>  }
>  
> +static struct omap_musb_board_data musb_board_data = {
> +	.interface_type		= MUSB_INTERFACE_UTMI,
> +	.mode			= MUSB_PERIPHERAL,
> +	.power			= 100,
> +};
>  
>  static void __init omap_4430sdp_init(void)
>  {
>  	platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
>  	omap_serial_init();
> +#ifdef CONFIG_NOP_USB_XCEIV
> +	/* OMAP4 SDP uses Internal transceiver so register nop transceiver */
> +	usb_nop_xceiv_register();
> +#endif
> +	usb_musb_init(&musb_board_data);

If you add a select of NOP_USB_XCEIV in the board config option you can
do away with the ifdef.

Is there ever a case, for this board, where you don't want NOP_USB_XCEIV
enabled?

Failing that, add an empty init function to the header file such that
you can always call it even when the option is not enabled. It keeps
the amount of ifdeffery in the code to a minimum.


-Olof

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic