RE: [PATCH 1/2] ARM : OMAP: MUSB : Pass board specific data using a structure

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

 



>>Isn't it simpler to use same name across the boards like,
>>'musb_board_data'
>>Instead of 'omap3430sdp_data'.

[Maulik] Will change in the next version. 

> 
> -extern void usb_musb_init(enum musb_mode mode, unsigned power);
> +struct musb_omap_data {
> +u8	interface_type;
> +u8	mode;
> +u8	power;
> +};

>>It's board data so how about 'struct omap_musb_board_data'.

[Maulik] Will change in the next version.

> +
> +enum musb_interface	{MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
> +
> +extern void usb_musb_init(void *);

Can be modified to:
+extern void usb_musb_init(omap_musb_board_data *);

[Maulik] Will change in the next version.


> +void __init usb_musb_init(void *arch_data)

>>It's actually board data so *board_data is clearer.

[Maulik] Can be done. Will change in the next version.


> +	musb_plat.arch_data = arch_data;

>>Not needed.

[Maulik] The patch adds a field interface_type for selecting between UTMI
and ULPI PHY. This is done for OMAP4 which uses internal UTMI phy.

Moreover in future if we need to add any board specific data it can be part
of this structure.

> --- felipe_musb.orig/include/linux/usb/musb.h
> +++ felipe_musb/include/linux/usb/musb.h
> @@ -84,6 +84,9 @@ struct musb_hdrc_platform_data {
> 
>  	/* MUSB configuration-specific details */
>  	struct musb_hdrc_config	*config;
> +
> +	/* Board specific data	*/
> +	void		*arch_data;

>>We don't need it as we will continue using 'power', 'mode', 'extvbus'
>>From musb_plat only.

[Maulik] The patch adds a field interface_type for selecting between UTMI
and ULPI PHY. This is done for OMAP4 which uses internal UTMI phy.

Moreover in future if we need to add any board specific data it can be part
of this structure.


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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux