[0/2] power: regulator: pfuze100: Fix voltage calculation and support high-range
mbox series

Message ID 20260111073339.1297089-1-michael@amarulasolutions.com
Headers show
Series
  • power: regulator: pfuze100: Fix voltage calculation and support high-range
Related show

Message

Michael Nazzareno Trimarchi Jan. 11, 2026, 7:33 a.m. UTC
This series addresses two significant issues in the pfuze100 regulator driver
regarding voltage calculation accuracy.

The first patch fixes the handling of the "high range" bit. PFUZE chips support
two voltage ranges (controlled by a register bit) with different step sizes
and base voltages. Previously, the driver assumed the low range, leading to
incorrect voltage settings on boards configured for the high range.

The second patch corrects the interpretation of min_uV. The driver was
incorrectly using the device tree's regulator-min-microvolt constraint as the
mathematical base (zero-index) for voltage calculations. This caused offset
errors whenever the DTS constraint differed from the hardware's absolute minimum.
The patch introduces physical minimums in the driver descriptors to ensure
calculations are based on the datasheet specifications, treating the DTS value
strictly as a safety constraint.

Together, these changes align the U-Boot driver logic with the Linux kernel
implementation and ensure correct voltage output.

Michael Trimarchi (2):
  power: regulator: pfuze100: support high voltage range bit
  power: regulator: pfuze100: Decouple hardware base voltage from DTS
    constraints

 drivers/power/regulator/pfuze100.c | 138 ++++++++++++++++++-----------
 1 file changed, 88 insertions(+), 50 deletions(-)