[PATCH v9 5/8] ASoC: mediatek: mt8186: add machine driver with mt6366, da7219 and max98357

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Thu Jul 14 07:13:02 PDT 2022


Il 12/07/22 17:04, Jiaxin Yu ha scritto:
> Add support for mt8186 board with mt6366, da7219 and max98357.
> 
> Signed-off-by: Jiaxin Yu <jiaxin.yu at mediatek.com>
> ---
>   sound/soc/mediatek/Kconfig                    |   16 +
>   sound/soc/mediatek/mt8186/Makefile            |    1 +
>   .../mt8186/mt8186-mt6366-da7219-max98357.c    | 1002 +++++++++++++++++
>   3 files changed, 1019 insertions(+)
>   create mode 100644 sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c
> 

> +
> +static int mt8186_mt6366_da7219_max98357_dev_probe(struct platform_device *pdev)
> +{
> +	struct snd_soc_card *card;
> +	struct snd_soc_dai_link *dai_link;
> +	struct mt8186_mt6366_da7219_max98357_priv *priv;
> +	struct device_node *platform_node, *headset_codec, *playback_codec;
> +	int ret, i;
> +
> +	card = (struct snd_soc_card *)of_device_get_match_data(&pdev->dev);

You don't really need this cast, plus, you can use device_get_match_data() instead.

After that:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>



More information about the Linux-mediatek mailing list