regulator: core: avoid error messages for deferred probing
PATCH 1/1 regulator: core: avoid error messages for deferred probing
Noise like this happens on boot with regulators which can be bypassed when the supply is not probed. That looks too alarming and confusing.
[ 3.844092] vddpu: bypassed regulator has no supply! [ 3.849105] vddpu: failed to get the current voltage: -EPROBE_DEFER [ 3.855591] vddpu: supplied by DCDC1 [ 3.877211] vddsoc: bypassed regulator has no supply! [ 3.882538] vddsoc: failed to get the current voltage: -EPROBE_DEFER [ 3.888975] vddsoc: supplied by DCDC1
Handle such issues silently.
Signed-off-by Andreas Kemnade <[email protected]>
--- drivers/regulator/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/regulator/core.c +7 -1
@@ -1168,6 +1168,9 @@ static int machine_constraints_voltage(struct regulator_dev *rdev, current_uV =regulator_get_voltage_rdev (rdev); } +if (current_uV == -EPROBE_DEFER ) +return -EPROBE_DEFER ; +if (current_uV <0 ) { rdev_err(rdev, "failed to get the current voltage: %pe\n",
@@ -4151,9 +4154,12 @@ int regulator_get_voltage_rdev(struct regulator_dev *rdev)if (bypassed) {/* if bypassed the regulator must have a supply */ if (!rdev->supply) { +if (rdev->supply_name) +return -EPROBE_DEFER ; +rdev_err (rdev,"bypassed regulator has no supply!\n" ); -return -EPROBE_DEFER ; +return -EINVAL ; }return regulator_get_voltage_rdev (rdev->supply->rdev);
Signature · 1 line
2.29.2
Mark Brown
maintainerQuoted 2 lines · Andreas Kemnade
Noise like this happens on boot with regulators which can be bypassed when the supply is not probed. That looks too alarming and confusing.
...
Quoted 1 line
Handle such issues silently.
This means that if something is failing to probe due to deferral the user has no diagnostics of any kind which would allow them to figure out why that's happening. Reducing the severity of the diagnostics might make sense but completely removing them is going to frustrate people.