Lines Matching +full:inactive +full:- +full:delay

1 /*-
56 if (ofw_bus_is_compatible(dev, "gpio-poweroff")) { in gpiopower_probe()
59 } else if (ofw_bus_is_compatible(dev, "gpio-restart")) { in gpiopower_probe()
76 if ((node = ofw_bus_get_node(dev)) == -1) in gpiopower_attach()
79 if (ofw_gpiobus_parse_gpios(dev, "gpios", &sc->sc_pin) <= 0) { in gpiopower_attach()
84 if (ofw_bus_is_compatible(dev, "gpio-poweroff")) in gpiopower_attach()
85 sc->sc_rbmask = RB_HALT | RB_POWEROFF; in gpiopower_attach()
87 sc->sc_rbmask = 0; in gpiopower_attach()
89 sc->sc_hi_period = 100000; in gpiopower_attach()
90 sc->sc_lo_period = 100000; in gpiopower_attach()
91 sc->sc_timeout = 1000000; in gpiopower_attach()
93 if ((OF_getprop(node, "active-delay-ms", &prop, sizeof(prop))) > 0) in gpiopower_attach()
94 sc->sc_hi_period = fdt32_to_cpu(prop) * 1000; in gpiopower_attach()
95 if ((OF_getprop(node, "inactive-delay-ms", &prop, sizeof(prop))) > 0) in gpiopower_attach()
96 sc->sc_lo_period = fdt32_to_cpu(prop) * 1000; in gpiopower_attach()
97 if ((OF_getprop(node, "timeout-ms", &prop, sizeof(prop))) > 0) in gpiopower_attach()
98 sc->sc_timeout = fdt32_to_cpu(prop) * 1000; in gpiopower_attach()
113 do_assert = sc->sc_rbmask ? (sc->sc_rbmask & howto) : in gpiopower_assert()
126 gpio_pin_setflags(sc->sc_pin, GPIO_PIN_OUTPUT); in gpiopower_assert()
127 gpio_pin_set_active(sc->sc_pin, true); in gpiopower_assert()
128 DELAY(sc->sc_hi_period); in gpiopower_assert()
129 gpio_pin_set_active(sc->sc_pin, false); in gpiopower_assert()
130 DELAY(sc->sc_lo_period); in gpiopower_assert()
131 gpio_pin_set_active(sc->sc_pin, true); in gpiopower_assert()
132 DELAY(sc->sc_timeout); in gpiopower_assert()