git: ec5083a0e890 - main - rk_iodomain: Do not require optional FDT properties.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 04 May 2025 17:09:31 UTC
The branch main has been updated by mmel:
URL: https://cgit.FreeBSD.org/src/commit/?id=ec5083a0e890be3e59960e73867b611d32c11c4c
commit ec5083a0e890be3e59960e73867b611d32c11c4c
Author: Michal Meloun <mmel@FreeBSD.org>
AuthorDate: 2025-02-18 14:46:07 +0000
Commit: Michal Meloun <mmel@FreeBSD.org>
CommitDate: 2025-05-04 11:49:03 +0000
rk_iodomain: Do not require optional FDT properties.
The regulatos in the list are documented as optional, do not require them.
MFC after: 2 weeks
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D50101
---
sys/arm64/rockchip/rk_iodomain.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/sys/arm64/rockchip/rk_iodomain.c b/sys/arm64/rockchip/rk_iodomain.c
index ed61b99481f2..7b4006fc9aed 100644
--- a/sys/arm64/rockchip/rk_iodomain.c
+++ b/sys/arm64/rockchip/rk_iodomain.c
@@ -163,11 +163,16 @@ rk_iodomain_set(struct rk_iodomain_softc *sc)
regulator_t supply;
uint32_t reg = 0;
uint32_t mask = 0;
- int uvolt, i;
+ int uvolt, i, rv;
for (i = 0; i < sc->conf->nsupply; i++) {
- if (regulator_get_by_ofw_property(sc->dev, sc->node,
- sc->conf->supply[i].name, &supply) != 0) {
+ rv = regulator_get_by_ofw_property(sc->dev, sc->node,
+ sc->conf->supply[i].name, &supply);
+
+ if (rv == ENOENT)
+ continue;
+
+ if (rv != 0) {
device_printf(sc->dev,
"Cannot get property for regulator %s\n",
sc->conf->supply[i].name);