Re: [PATCH] PCI: qcom: use regulator bluk api for apq8064 supplies

2018-02-14 Thread Srinivas Kandagatla



On 14/02/18 15:35, Bjorn Andersson wrote:

+   res->supplies[1].supply = "vdda_phy";
+   res->supplies[1].supply = "vdda_refclk";

2


+   ret = devm_regulator_bulk_get(dev, QCOM_PCIE_2_1_0_MAX_SUPPLY,

Use ARRAY_SIZE(res->supplies) instead.

Thanks, Will fix it and send a new one.

--srini



+ res->supplies);
+   if (ret)
+   return ret;
  

Other than that, this looks good.


Re: [PATCH] PCI: qcom: use regulator bluk api for apq8064 supplies

2018-02-14 Thread Srinivas Kandagatla



On 14/02/18 15:35, Bjorn Andersson wrote:

+   res->supplies[1].supply = "vdda_phy";
+   res->supplies[1].supply = "vdda_refclk";

2


+   ret = devm_regulator_bulk_get(dev, QCOM_PCIE_2_1_0_MAX_SUPPLY,

Use ARRAY_SIZE(res->supplies) instead.

Thanks, Will fix it and send a new one.

--srini



+ res->supplies);
+   if (ret)
+   return ret;
  

Other than that, this looks good.


Re: [PATCH] PCI: qcom: use regulator bluk api for apq8064 supplies

2018-02-14 Thread Bjorn Andersson
On Wed 14 Feb 04:23 PST 2018, Srinivas Kandagatla wrote:
> @@ -217,18 +216,15 @@ static int qcom_pcie_get_resources_2_1_0(struct 
> qcom_pcie *pcie)
>   struct qcom_pcie_resources_2_1_0 *res = >res.v2_1_0;
>   struct dw_pcie *pci = pcie->pci;
>   struct device *dev = pci->dev;
> + int ret;
>  
> - res->vdda = devm_regulator_get(dev, "vdda");
> - if (IS_ERR(res->vdda))
> - return PTR_ERR(res->vdda);
> -
> - res->vdda_phy = devm_regulator_get(dev, "vdda_phy");
> - if (IS_ERR(res->vdda_phy))
> - return PTR_ERR(res->vdda_phy);
> -
> - res->vdda_refclk = devm_regulator_get(dev, "vdda_refclk");
> - if (IS_ERR(res->vdda_refclk))
> - return PTR_ERR(res->vdda_refclk);
> + res->supplies[0].supply = "vdda";
> + res->supplies[1].supply = "vdda_phy";
> + res->supplies[1].supply = "vdda_refclk";

2

> + ret = devm_regulator_bulk_get(dev, QCOM_PCIE_2_1_0_MAX_SUPPLY,

Use ARRAY_SIZE(res->supplies) instead.

> +   res->supplies);
> + if (ret)
> + return ret;
>  

Other than that, this looks good.

Regards,
Bjorn


Re: [PATCH] PCI: qcom: use regulator bluk api for apq8064 supplies

2018-02-14 Thread Bjorn Andersson
On Wed 14 Feb 04:23 PST 2018, Srinivas Kandagatla wrote:
> @@ -217,18 +216,15 @@ static int qcom_pcie_get_resources_2_1_0(struct 
> qcom_pcie *pcie)
>   struct qcom_pcie_resources_2_1_0 *res = >res.v2_1_0;
>   struct dw_pcie *pci = pcie->pci;
>   struct device *dev = pci->dev;
> + int ret;
>  
> - res->vdda = devm_regulator_get(dev, "vdda");
> - if (IS_ERR(res->vdda))
> - return PTR_ERR(res->vdda);
> -
> - res->vdda_phy = devm_regulator_get(dev, "vdda_phy");
> - if (IS_ERR(res->vdda_phy))
> - return PTR_ERR(res->vdda_phy);
> -
> - res->vdda_refclk = devm_regulator_get(dev, "vdda_refclk");
> - if (IS_ERR(res->vdda_refclk))
> - return PTR_ERR(res->vdda_refclk);
> + res->supplies[0].supply = "vdda";
> + res->supplies[1].supply = "vdda_phy";
> + res->supplies[1].supply = "vdda_refclk";

2

> + ret = devm_regulator_bulk_get(dev, QCOM_PCIE_2_1_0_MAX_SUPPLY,

Use ARRAY_SIZE(res->supplies) instead.

> +   res->supplies);
> + if (ret)
> + return ret;
>  

Other than that, this looks good.

Regards,
Bjorn