Index: sys/dev/extres/regulator/regulator_fixed.c =================================================================== --- sys/dev/extres/regulator/regulator_fixed.c +++ sys/dev/extres/regulator/regulator_fixed.c @@ -161,10 +161,13 @@ enable = sc->param->boot_on || sc->param->always_on; if (!sc->param->enable_active_high) enable = !enable; - rv = GPIO_PIN_SET(pin->dev, pin->pin, enable); - if (rv != 0) { - device_printf(dev, "Cannot set GPIO pin: %d\n", pin->pin); - return (rv); + if (enable) { + rv = GPIO_PIN_SET(pin->dev, pin->pin, enable); + if (rv != 0) { + device_printf(dev, "Cannot set GPIO pin: %d\n", + pin->pin); + return (rv); + } } rv = GPIO_PIN_SETFLAGS(pin->dev, pin->pin, flags); if (rv != 0) {