Skip to contentSkip to conversation

pmdomain: rockchip: quiet regulator error on -EPROBE_DEFER

PATCH In review Chris Morgan 4 participants 4 messages Jan 30 – Mar 4

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 pmdomain: rockchip: quiet regulator error on -EPROBE_DEFER

From: Chris Morgan <[email protected]>

Change the dev_err() to dev_err_probe() under rockchip_pd_power_on() to prevent errors early in the boot process when the requested regulator is not yet available. This converts errors like the following to debug messages:

rockchip-pm-domain fd8d8000.power-management:power-controller: Failed to enable supply: -517

---
Changes since v1:
- Simplified return to single line

---
 drivers/pmdomain/rockchip/pm-domains.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/pmdomain/rockchip/pm-domains.c +3 -4
index 997e93c12951..6d3fb18f4ab3 100644
@@ -705,10 +705,9 @@ static int rockchip_pd_power_on(struct generic_pm_domain *domain)
 	int ret;
 
 	ret = rockchip_pd_regulator_enable(pd);
-	if (ret) {
-		dev_err(pd->pmu->dev, "Failed to enable supply: %d\n", ret);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(pd->pmu->dev, ret,
+				     "Failed to enable supply: %d\n", ret);
 
 	ret = rockchip_pd_power(pd, true);
 	if (ret)
Signature · 1 line
2.43.0
Reviewed-by on v2 1/1
#1 lore raw

Hi Chris,

Quoted 8 lines · Chris Morgan

From: Chris Morgan <[email protected]>

Change the dev_err() to dev_err_probe() under rockchip_pd_power_on() to prevent errors early in the boot process when the requested regulator is not yet available. This converts errors like the following to debug messages:

Quoted 4 lines

rockchip-pm-domain fd8d8000.power-management:power-controller: Failed to enable supply: -517

Thanks
-Anand

Quoted 33 lines

---
Changes since v1:
- Simplified return to single line

---
 drivers/pmdomain/rockchip/pm-domains.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/pmdomain/rockchip/pm-domains.c +3 -5
index 997e93c12951..6d3fb18f4ab3 100644
@@ -705,10 +705,9 @@ static int rockchip_pd_power_on(struct generic_pm_domain *domain)
        int ret;
 
        ret = rockchip_pd_regulator_enable(pd);
-       if (ret) {
-               dev_err(pd->pmu->dev, "Failed to enable supply: %d\n", ret);
-               return ret;
-       }
+       if (ret)
+               return dev_err_probe(pd->pmu->dev, ret,
+                                    "Failed to enable supply: %d\n", ret);
 
        ret = rockchip_pd_power(pd, true);
        if (ret)
--

2.43.0

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

Reviewed-by on v2 1/1
#2 lore raw
In reply to Chris Morgan
Quoted 7 lines · Chris Morgan

From: Chris Morgan <[email protected]>

Change the dev_err() to dev_err_probe() under rockchip_pd_power_on() to prevent errors early in the boot process when the requested regulator is not yet available. This converts errors like the following to debug messages:

Quoted 30 lines

rockchip-pm-domain fd8d8000.power-management:power-controller: Failed to enable supply: -517

---
Changes since v1:
- Simplified return to single line

---
  drivers/pmdomain/rockchip/pm-domains.c | 7 +++----
  1 file changed, 3 insertions(+), 4 deletions(-)
drivers/pmdomain/rockchip/pm-domains.c +3 -4
index 997e93c12951..6d3fb18f4ab3 100644
@@ -705,10 +705,9 @@ static int rockchip_pd_power_on(struct generic_pm_domain *domain)
  	int ret;
 
  	ret = rockchip_pd_regulator_enable(pd);
-	if (ret) {
-		dev_err(pd->pmu->dev, "Failed to enable supply: %d\n", ret);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(pd->pmu->dev, ret,
+				     "Failed to enable supply: %d\n", ret);
 
  	ret = rockchip_pd_power(pd, true);
  	if (ret)
#3 lore raw
In reply to Chris Morgan
Quoted 8 lines · Chris Morgan

From: Chris Morgan <[email protected]>

Change the dev_err() to dev_err_probe() under rockchip_pd_power_on() to prevent errors early in the boot process when the requested regulator is not yet available. This converts errors like the following to debug messages:

Quoted 4 lines

rockchip-pm-domain fd8d8000.power-management:power-controller: Failed to enable supply: -517

Applied for next, thanks!

Kind regards
Uffe

Quoted 28 lines

---
Changes since v1:
- Simplified return to single line

---
 drivers/pmdomain/rockchip/pm-domains.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/pmdomain/rockchip/pm-domains.c +3 -5
index 997e93c12951..6d3fb18f4ab3 100644
@@ -705,10 +705,9 @@ static int rockchip_pd_power_on(struct generic_pm_domain *domain)
        int ret;
 
        ret = rockchip_pd_regulator_enable(pd);
-       if (ret) {
-               dev_err(pd->pmu->dev, "Failed to enable supply: %d\n", ret);
-               return ret;
-       }
+       if (ret)
+               return dev_err_probe(pd->pmu->dev, ret,
+                                    "Failed to enable supply: %d\n", ret);
 
        ret = rockchip_pd_power(pd, true);
        if (ret)
--

2.43.0