Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146323639
D17978.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17978.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D17978: regulator_fixed: Do not disable fixed regulator at probe
Attached
Detach File
Event Timeline
Log In to Comment