git: 5ca038636a54 - main - axp81x: Get the voltage of the regulators with a single range
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 10 Nov 2026 13:42:58 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=5ca038636a54c3d7504123fde00aa78c4169440f
commit 5ca038636a54c3d7504123fde00aa78c4169440f
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-11-10 07:55:06 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-10 13:42:45 +0000
axp81x: Get the voltage of the regulators with a single range
axp8xx_regnode_get_voltage() failed when the regulator has no second
step, which is the case of the ones with a single range. Only the first
step is mandatory, as in axp8xx_regnode_set_voltage().
Tested on: A64, H6
---
sys/arm/allwinner/axp81x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/arm/allwinner/axp81x.c b/sys/arm/allwinner/axp81x.c
index 41c6feeb46a3..eb1852895bf3 100644
--- a/sys/arm/allwinner/axp81x.c
+++ b/sys/arm/allwinner/axp81x.c
@@ -912,7 +912,7 @@ axp8xx_regnode_get_voltage(struct regnode *regnode, int *uvolt)
sc = regnode_get_softc(regnode);
- if (!sc->def->voltage_step1 || !sc->def->voltage_step2)
+ if (sc->def->voltage_step1 == 0)
return (ENXIO);
if (axp8xx_read(sc->base_dev, sc->def->voltage_reg, &val, 1) != 0)