[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a27741c1-5ac5-43e8-a784-5023f1784676@kernel.org>
Date: Wed, 21 May 2025 13:59:45 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Zhang Yi <zhangyi@...rest-semi.com>, broonie@...nel.org, robh@...nel.org,
tiwai@...e.com, devicetree@...r.kernel.org, conor+dt@...nel.org,
lgirdwood@...il.com, linux-kernel@...r.kernel.org,
linux-sound@...r.kernel.org, perex@...ex.cz, krzk+dt@...nel.org
Cc: amadeuszx.slawinski@...ux.intel.com
Subject: Re: [PATCH 2/2] ASoC: codecs: add support for ES8375
On 21/05/2025 12:42, Zhang Yi wrote:
> +
> +static struct snd_soc_component_driver es8375_codec_driver = {
> + .probe = es8375_codec_probe,
> + .suspend = es8375_suspend,
> + .resume = es8375_resume,
> + .set_bias_level = es8375_set_bias_level,
> + .controls = es8375_snd_controls,
> + .num_controls = ARRAY_SIZE(es8375_snd_controls),
> + .dapm_widgets = es8375_dapm_widgets,
> + .num_dapm_widgets = ARRAY_SIZE(es8375_dapm_widgets),
> + .dapm_routes = es8375_dapm_routes,
> + .num_dapm_routes = ARRAY_SIZE(es8375_dapm_routes),
> +
> + .idle_bias_on = 1,
> + .suspend_bias_off = 1,
> +};
> +
> +static int es8375_read_device_properities(struct device *dev, struct es8375_priv *es8375)
> +{
> + int ret;
> +
> + ret = device_property_read_u8(dev, "everest,mclk-src", &es8375->mclk_src);
These are not documented for DT, but you have here other interfaces. We
do not have such case nicely solved, so please add explicit comment that
usage of this and dmic-pol in DT based platforms is not allowed and this
is not considered ABI.
> + if (ret != 0)
> + es8375->mclk_src = ES8375_MCLK_SOURCE;
> + dev_dbg(dev, "mclk-src %x", es8375->mclk_src);
> +
> + ret = device_property_read_u8(dev, "everest,dmic-pol", &es8375->dmic_pol);
> + if (ret != 0)
> + es8375->dmic_pol = DMIC_POL;
> + dev_dbg(dev, "dmic-pol %x", es8375->dmic_pol);
> +
Best regards,
Krzysztof
Powered by blists - more mailing lists