Page MenuHomeFreeBSD

D17978.id.diff
No OneTemporary

D17978.id.diff

Index: head/sys/dev/extres/regulator/regulator_fixed.c
===================================================================
--- head/sys/dev/extres/regulator/regulator_fixed.c
+++ head/sys/dev/extres/regulator/regulator_fixed.c
@@ -145,7 +145,6 @@
struct regnode_fixed_sc *sc;
struct gpiobus_pin *pin;
uint32_t flags;
- bool enable;
int rv;
sc = regnode_get_softc(regnode);
@@ -158,14 +157,15 @@
flags = GPIO_PIN_OUTPUT;
if (sc->gpio_open_drain)
flags |= GPIO_PIN_OPENDRAIN;
- 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 (sc->param->boot_on || sc->param->always_on) {
+ rv = GPIO_PIN_SET(pin->dev, pin->pin, sc->param->enable_active_high);
+ 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) {
device_printf(dev, "Cannot configure GPIO pin: %d\n", pin->pin);

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 2, 6:14 PM (3 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29166368
Default Alt Text
D17978.id.diff (1 KB)

Event Timeline