Skip to content

Commit

Permalink
Merge tag 'imx-fixes-4.13-2' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/shawnguo/linux into fixes

Pull "i.MX fixes for 4.13, round 2" from Shawn Guo:

 - Add missing 'ranges' property for i.MX25 device tree TSCADC node, so
   that it's child nodes ADC and TSC device can be probed by kernel.
 - Fix i.MX GPCv2 power domain driver to request regulator after power
   domain initialization, since regulator could defer probing and
   therefore cause power domain initialized twice.

* tag 'imx-fixes-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: dts: i.MX25: add ranges to tscadc
  soc: imx: gpcv2: fix regulator deferred probe
  • Loading branch information
Arnd Bergmann committed Aug 15, 2017
2 parents 69a80d8 + 8317562 commit 64c2c37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/imx25.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@
#address-cells = <1>;
#size-cells = <1>;
status = "disabled";
ranges;

adc: adc@50030800 {
compatible = "fsl,imx25-gcq";
Expand Down
15 changes: 8 additions & 7 deletions drivers/soc/imx/gpcv2.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,23 +200,24 @@ static int imx7_pgc_domain_probe(struct platform_device *pdev)

domain->dev = &pdev->dev;

ret = pm_genpd_init(&domain->genpd, NULL, true);
if (ret) {
dev_err(domain->dev, "Failed to init power domain\n");
return ret;
}

domain->regulator = devm_regulator_get_optional(domain->dev, "power");
if (IS_ERR(domain->regulator)) {
if (PTR_ERR(domain->regulator) != -ENODEV) {
dev_err(domain->dev, "Failed to get domain's regulator\n");
if (PTR_ERR(domain->regulator) != -EPROBE_DEFER)
dev_err(domain->dev, "Failed to get domain's regulator\n");
return PTR_ERR(domain->regulator);
}
} else {
regulator_set_voltage(domain->regulator,
domain->voltage, domain->voltage);
}

ret = pm_genpd_init(&domain->genpd, NULL, true);
if (ret) {
dev_err(domain->dev, "Failed to init power domain\n");
return ret;
}

ret = of_genpd_add_provider_simple(domain->dev->of_node,
&domain->genpd);
if (ret) {
Expand Down

0 comments on commit 64c2c37

Please sign in to comment.