Arend van Spriel <[email protected]> writes:
> From: Hante Meuleman <[email protected]>
>
> Platform data is only available for sdio. With this patch a new
> platform data structure is being used which allows for platform
> data for any device and configurable per device. This patch only
> switches to the new structure and adds support for SDIO devices.
>
> Reviewed-by: Arend Van Spriel <[email protected]>
> Reviewed-by: Franky (Zhenhui) Lin <[email protected]>
> Reviewed-by: Pieter-Paul Giesberts <[email protected]>
> Signed-off-by: Hante Meuleman <[email protected]>
> Signed-off-by: Arend van Spriel <[email protected]>
It's more work to review patches which rename a file and adds new
features at the same time. Splitting this to two patches, first a simple
rename and then adding support for SDIO, would have been much nicer.
> static void brcmf_mp_attach(void)
> {
> + /* If module param firmware path is set then this will always be used,
> + * if not set then if available use the platform data version. To make
> + * sure it gets initialized at all, always copy the module param version
> + */
> strlcpy(brcmf_mp_global.firmware_path, brcmf_firmware_path,
> BRCMF_FW_ALTPATH_LEN);
> + if ((brcmfmac_pdata) && (brcmfmac_pdata->fw_alternative_path) &&
> + (brcmf_mp_global.firmware_path[0] == '\0')) {
> + strlcpy(brcmf_mp_global.firmware_path,
> + brcmfmac_pdata->fw_alternative_path,
> + BRCMF_FW_ALTPATH_LEN);
> + }
[...]
> +/**
> + * struct brcmfmac_platform_data - BRCMFMAC specific platform data.
> + *
> + * @power_on: This function is called by the brcmfmac driver when the
> module
> + * gets loaded. This can be particularly useful for low power
> + * devices. The platform spcific routine may for example decide to
> + * power up the complete device. If there is no use-case for this
> + * function then provide NULL.
> + * @power_off: This function is called by the brcmfmac when the module
> gets
> + * unloaded. At this point the devices can be powered down or
> + * otherwise be reset. So if an actual power_off is not supported
> + * but reset is supported by the devices then reset the devices
> + * when this function gets called. This can be particularly useful
> + * for low power devices. If there is no use-case for this
> + * function then provide NULL.
> + */
> +struct brcmfmac_platform_data {
> + void (*power_on)(void);
> + void (*power_off)(void);
> + char *fw_alternative_path;
> + int device_count;
> + struct brcmfmac_pd_device devices[0];
> +};
If I understood correctly this undocumented, and not mentioned in the
commit log, fw_alternative_path is a new feature in platform data. I
guess it provides a different firmware image name for the device so that
devices can have different firmware images on the same system?
It's not pretty but I guess okayish. Opinions?
--
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html