diff mbox series

[v3,1/2] ASoC: qcom: lpass: Fix apq8016 compat string to match yaml

Message ID 20220429220349.1142759-2-bryan.odonoghue@linaro.org (mailing list archive)
State New, archived
Headers show
Series Fix apq8016 compat string | expand

Commit Message

Bryan O'Donoghue April 29, 2022, 10:03 p.m. UTC
The documented yaml compat string for the apq8016 is
"qcom,apq8016-lpass-cpu" not "qcom,lpass-cpu-apq8016". Looking at the other
lpass compat strings the general form is "qcom,socnum-lpass-cpu".

We need to fix both the driver and dts to match.

Fixes: dc1ebd1811e9 ("ASoC: qcom: Add apq8016 lpass driver support")
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 sound/soc/qcom/lpass-apq8016.c | 1 +
 sound/soc/qcom/lpass-cpu.c     | 5 +++++
 2 files changed, 6 insertions(+)

Comments

Bjorn Andersson June 27, 2022, 8:40 p.m. UTC | #1
On Fri 29 Apr 17:03 CDT 2022, Bryan O'Donoghue wrote:

Adding the sound maintainers to To/Cc, please advice if you would prefer
Bryan to resubmit the patch with proper recipients.

> The documented yaml compat string for the apq8016 is
> "qcom,apq8016-lpass-cpu" not "qcom,lpass-cpu-apq8016". Looking at the other
> lpass compat strings the general form is "qcom,socnum-lpass-cpu".
> 
> We need to fix both the driver and dts to match.
> 
> Fixes: dc1ebd1811e9 ("ASoC: qcom: Add apq8016 lpass driver support")
> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Once this patch is picked up I can merge the dts change.

Regards,
Bjorn

> ---
>  sound/soc/qcom/lpass-apq8016.c | 1 +
>  sound/soc/qcom/lpass-cpu.c     | 5 +++++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/sound/soc/qcom/lpass-apq8016.c b/sound/soc/qcom/lpass-apq8016.c
> index 3efa133d1c64..abaf694ee9a3 100644
> --- a/sound/soc/qcom/lpass-apq8016.c
> +++ b/sound/soc/qcom/lpass-apq8016.c
> @@ -293,6 +293,7 @@ static struct lpass_variant apq8016_data = {
>  
>  static const struct of_device_id apq8016_lpass_cpu_device_id[] __maybe_unused = {
>  	{ .compatible = "qcom,lpass-cpu-apq8016", .data = &apq8016_data },
> +	{ .compatible = "qcom,apq8016-lpass-cpu", .data = &apq8016_data },
>  	{}
>  };
>  MODULE_DEVICE_TABLE(of, apq8016_lpass_cpu_device_id);
> diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
> index e6846ad2b5fa..53f9bf6581d3 100644
> --- a/sound/soc/qcom/lpass-cpu.c
> +++ b/sound/soc/qcom/lpass-cpu.c
> @@ -1102,6 +1102,11 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
>  	if (!match || !match->data)
>  		return -EINVAL;
>  
> +	if (of_device_is_compatible(dev->of_node, "qcom,lpass-cpu-apq8016")) {
> +		dev_warn(dev, "%s compatible is deprecated\n",
> +			 match->compatible);
> +	}
> +
>  	drvdata->variant = (struct lpass_variant *)match->data;
>  	variant = drvdata->variant;
>  
> -- 
> 2.35.1
>
Mark Brown June 27, 2022, 10:24 p.m. UTC | #2
On Mon, Jun 27, 2022 at 03:40:22PM -0500, Bjorn Andersson wrote:

> On Fri 29 Apr 17:03 CDT 2022, Bryan O'Donoghue wrote:
> 
> Adding the sound maintainers to To/Cc, please advice if you would prefer
> Bryan to resubmit the patch with proper recipients.

Yes, please.
diff mbox series

Patch

diff --git a/sound/soc/qcom/lpass-apq8016.c b/sound/soc/qcom/lpass-apq8016.c
index 3efa133d1c64..abaf694ee9a3 100644
--- a/sound/soc/qcom/lpass-apq8016.c
+++ b/sound/soc/qcom/lpass-apq8016.c
@@ -293,6 +293,7 @@  static struct lpass_variant apq8016_data = {
 
 static const struct of_device_id apq8016_lpass_cpu_device_id[] __maybe_unused = {
 	{ .compatible = "qcom,lpass-cpu-apq8016", .data = &apq8016_data },
+	{ .compatible = "qcom,apq8016-lpass-cpu", .data = &apq8016_data },
 	{}
 };
 MODULE_DEVICE_TABLE(of, apq8016_lpass_cpu_device_id);
diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index e6846ad2b5fa..53f9bf6581d3 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -1102,6 +1102,11 @@  int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
 	if (!match || !match->data)
 		return -EINVAL;
 
+	if (of_device_is_compatible(dev->of_node, "qcom,lpass-cpu-apq8016")) {
+		dev_warn(dev, "%s compatible is deprecated\n",
+			 match->compatible);
+	}
+
 	drvdata->variant = (struct lpass_variant *)match->data;
 	variant = drvdata->variant;