[Meego-kernel] Patch[4/4] 0004-mrst.c-add-platform-support-for-wl12xx.patch

Alan Cox alan at linux.intel.com
Thu Nov 18 06:58:57 PST 2010


> This regulator is only available after scu is initialized.
> So we need to declare it in the scu initialized callback.

Why not just delay the wl12xx creation the same way as I²C and SPI
devices can already be delayed ? No need for hacks nailed onto the end
of the creation code that will end up with hack after hack for devices
otherwise.

> +unsigned int wifi_irq_gpio;
> +unsigned int wifi_enable_gpio;
> +
> +struct wl12xx_platform_data mid_wifi_control __initdata = {
> +	.board_ref_clock = 2,
> +	.irq = 2,
> +};

All these can be static


> +	/* Set our board_ref_clock from SFI SD board info */
> +	if (sd_info->board_ref_clock == ICDK_BOARD_REF_CLK)
> +		/*iCDK board*/
> +		/*26Mhz TCXO clock ref*/
> +		mid_wifi_control.board_ref_clock = 1;
> +	else if (sd_info->board_ref_clock == NCDK_BOARD_REF_CLK)
> +		/*nCDK board*/
> +		/*38,4Mhz TCXO clock ref*/
> +		mid_wifi_control.board_ref_clock = 2;

And what if it is something else - surely the ref clock value should go
to the driver.

> +	{"wl12xx_clk_vmmc", SFI_DEV_TYPE_SD, 0,
> &wl12xx_platform_data_init}, {},

And implement delayed support for type SD to clean up the hacks below ?





More information about the MeeGo-kernel mailing list