Skip to content

Commit ec5083a

Browse files
committed
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
1 parent 71279c1 commit ec5083a

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

sys/arm64/rockchip/rk_iodomain.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,16 @@ rk_iodomain_set(struct rk_iodomain_softc *sc)
163163
regulator_t supply;
164164
uint32_t reg = 0;
165165
uint32_t mask = 0;
166-
int uvolt, i;
166+
int uvolt, i, rv;
167167

168168
for (i = 0; i < sc->conf->nsupply; i++) {
169-
if (regulator_get_by_ofw_property(sc->dev, sc->node,
170-
sc->conf->supply[i].name, &supply) != 0) {
169+
rv = regulator_get_by_ofw_property(sc->dev, sc->node,
170+
sc->conf->supply[i].name, &supply);
171+
172+
if (rv == ENOENT)
173+
continue;
174+
175+
if (rv != 0) {
171176
device_printf(sc->dev,
172177
"Cannot get property for regulator %s\n",
173178
sc->conf->supply[i].name);

0 commit comments

Comments
 (0)