Skip to content

Commit

Permalink
ASoC: qcom: lpass: Fix apq8016 compat string to match yaml
Browse files Browse the repository at this point in the history
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.

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20220628120435.3044939-2-bryan.odonoghue@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Bryan O'Donoghue authored and Mark Brown committed Jun 28, 2022
1 parent 6ed91f5 commit 2a2ef68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/qcom/lpass-apq8016.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions sound/soc/qcom/lpass-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2a2ef68

Please sign in to comment.