[PATCH v1 2/2] power: regulator: palmas: set up voltage on probe

Svyatoslav Ryhel clamor95 at gmail.com
Wed Jul 12 10:24:18 CEST 2023


Without this patch PALMAS regulators are just "requested" without
actual initial setup (device tree values are completely ignored).
This causes major issue since voltage is usually set on probing
and rarely is changed. Drivers which change voltage assume that
initial voltage was already set and this was not the case.

Tested-by: Svyatoslav Ryhel <clamor95 at gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95 at gmail.com>
---
 drivers/power/regulator/palmas_regulator.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c
index 3c4eb83be7..cc292f6946 100644
--- a/drivers/power/regulator/palmas_regulator.c
+++ b/drivers/power/regulator/palmas_regulator.c
@@ -316,6 +316,8 @@ static int palmas_ldo_probe(struct udevice *dev)
 		}
 	}
 
+	regulator_autoset(dev);
+
 	return 0;
 }
 
@@ -423,6 +425,8 @@ static int palmas_smps_probe(struct udevice *dev)
 			printf("Invalid PMIC ID\n");
 	}
 
+	regulator_autoset(dev);
+
 	return 0;
 }
 
-- 
2.39.2



More information about the U-Boot mailing list