]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'imx-fixes-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawngu...
authorArnd Bergmann <arnd@arndb.de>
Tue, 15 Aug 2017 15:34:52 +0000 (17:34 +0200)
committerArnd Bergmann <arnd@arndb.de>
Tue, 15 Aug 2017 15:34:52 +0000 (17:34 +0200)
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

arch/arm/boot/dts/imx25.dtsi
drivers/soc/imx/gpcv2.c

index dfcc8e00cf1c53a753dc753c2c5598b220b480a1..0ade3619f3c3f1332b8d89c8d06ed4a67f29025b 100644 (file)
                                #address-cells = <1>;
                                #size-cells = <1>;
                                status = "disabled";
+                               ranges;
 
                                adc: adc@50030800 {
                                        compatible = "fsl,imx25-gcq";
index 3039072911a5bce09d375c04b9faf65071894c11..afc7ecc3c1876158d33e45933458fc035593c39f 100644 (file)
@@ -200,16 +200,11 @@ 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 {
@@ -217,6 +212,12 @@ static int imx7_pgc_domain_probe(struct platform_device *pdev)
                                      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) {