Skip to content

Commit 42c18d1

Browse files
committed
Merge tag 'qcom-driver-fixes-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes
Qualcomm driver fixes for v6.2 Updated error handling in the async packer router driver made an optional property required, fix this. Also improve error handling in the probe function of the CPR driver. * tag 'qcom-driver-fixes-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: PM: AVS: qcom-cpr: Fix an error handling path in cpr_probe() soc: qcom: apr: Make qcom,protection-domain optional again dt-bindings: soc: qcom: apr: Make qcom,protection-domain optional again Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 23d3954 + 6049aae commit 42c18d1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ properties:
3939
qcom,protection-domain:
4040
$ref: /schemas/types.yaml#/definitions/string-array
4141
description: |
42-
Protection domain service name and path for APR service
43-
possible values are::
42+
Protection domain service name and path for APR service (if supported).
43+
Possible values are::
4444
"avs/audio", "msm/adsp/audio_pd".
4545
"kernel/elf_loader", "msm/modem/wlan_pd".
4646
"tms/servreg", "msm/adsp/audio_pd".
@@ -49,6 +49,5 @@ properties:
4949
5050
required:
5151
- reg
52-
- qcom,protection-domain
5352

5453
additionalProperties: true

drivers/soc/qcom/apr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,10 @@ static int apr_add_device(struct device *dev, struct device_node *np,
461461
goto out;
462462
}
463463

464+
/* Protection domain is optional, it does not exist on older platforms */
464465
ret = of_property_read_string_index(np, "qcom,protection-domain",
465466
1, &adev->service_path);
466-
if (ret < 0) {
467+
if (ret < 0 && ret != -EINVAL) {
467468
dev_err(dev, "Failed to read second value of qcom,protection-domain\n");
468469
goto out;
469470
}

drivers/soc/qcom/cpr.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,12 +1708,16 @@ static int cpr_probe(struct platform_device *pdev)
17081708

17091709
ret = of_genpd_add_provider_simple(dev->of_node, &drv->pd);
17101710
if (ret)
1711-
return ret;
1711+
goto err_remove_genpd;
17121712

17131713
platform_set_drvdata(pdev, drv);
17141714
cpr_debugfs_init(drv);
17151715

17161716
return 0;
1717+
1718+
err_remove_genpd:
1719+
pm_genpd_remove(&drv->pd);
1720+
return ret;
17171721
}
17181722

17191723
static int cpr_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)