Re: [PATCH] spmi: pmic-arb: Add support for PMIC v7

From: Stephen Boyd
Date: Thu Dec 02 2021 - 18:06:29 EST


Quoting Vinod Koul (2021-11-30 23:27:18)
> @@ -1169,8 +1270,12 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev)
> pmic_arb = spmi_controller_get_drvdata(ctrl);
> pmic_arb->spmic = ctrl;
>
> + /*
> + * Don't use devm_ioremap_resource() as the resources are shared in
> + * PMIC v7 onwards, so causing failure when mapping
> + */
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
> - core = devm_ioremap_resource(&ctrl->dev, res);
> + core = devm_ioremap(&ctrl->dev, res->start, resource_size(res));

What does this mean? We have two nodes in DT that have the same reg
properties? How does that work?

> if (IS_ERR(core)) {
> err = PTR_ERR(core);
> goto err_put_ctrl;