Home
last modified time | relevance | path

Searched refs:GPIO_PIN_OUTPUT (Results 1 – 25 of 73) sorted by relevance

123

/src/sys/riscv/sifive/
H A Dsifive_gpio.c50 #define SFGPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
155 ((output_en & (1u << i)) ? GPIO_PIN_OUTPUT : 0); in sfgpio_attach()
240 if (sc->gpio_pins[pin].gp_flags & GPIO_PIN_OUTPUT) in sfgpio_pin_get()
345 if (flags & GPIO_PIN_OUTPUT) { in sfgpio_pin_setflags()
347 sc->gpio_pins[pin].gp_flags |= GPIO_PIN_OUTPUT; in sfgpio_pin_setflags()
350 sc->gpio_pins[pin].gp_flags &= ~GPIO_PIN_OUTPUT; in sfgpio_pin_setflags()
411 sc->gpio_pins[i].gp_flags &= ~GPIO_PIN_OUTPUT; in sfgpio_pin_config_32()
412 } else if (pin_flags[i] & GPIO_PIN_OUTPUT) { in sfgpio_pin_config_32()
416 sc->gpio_pins[i].gp_flags |= GPIO_PIN_OUTPUT; in sfgpio_pin_config_32()
/src/sys/dev/ftgpio/
H A Dftgpio.c73 #define FTGPIO_GPIO_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_INVIN | \
172 if ((pin_flags & (GPIO_PIN_OUTPUT)) == 0) { in ftgpio_pin_write()
201 if ((pin_flags & (GPIO_PIN_OUTPUT | GPIO_PIN_INPUT)) == 0) { in ftgpio_pin_read()
207 if (pin_flags & GPIO_PIN_OUTPUT) in ftgpio_pin_read()
213 if (((pin_flags & (GPIO_PIN_OUTPUT|GPIO_PIN_INVOUT)) == (GPIO_PIN_OUTPUT|GPIO_PIN_INVOUT)) || in ftgpio_pin_read()
307 if ((pin_flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) == in ftgpio_pin_setflags()
308 (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) in ftgpio_pin_setflags()
322 else if (pin_flags & GPIO_PIN_OUTPUT) in ftgpio_pin_setflags()
379 pin->gp_flags |= GPIO_PIN_OUTPUT; in ftgpio_attach()
451 if ((sc->pins[pin_num].gp_flags & GPIO_PIN_OUTPUT) == 0) { in ftgpio_gpio_pin_set()
/src/sys/dev/rccgpio/
H A Drccgpio.c59 { .pin = (1 << 15), .name = "red LED", .caps = GPIO_PIN_OUTPUT },
60 { .pin = (1 << 17), .name = "green LED", .caps = GPIO_PIN_OUTPUT },
62 { .pin = (1 << 16), .name = "HD1 LED", .caps = GPIO_PIN_OUTPUT },
63 { .pin = (1 << 18), .name = "HD2 LED", .caps = GPIO_PIN_OUTPUT },
187 if ((rcc_pins[pin].caps & GPIO_PIN_OUTPUT) == 0) in rcc_gpio_pin_set()
231 if ((rcc_pins[pin].caps & GPIO_PIN_OUTPUT) == 0) in rcc_gpio_pin_toggle()
301 if (rcc_pins[i].caps & GPIO_PIN_OUTPUT) in rcc_gpio_attach()
/src/sys/dev/qcom_tlmm/
H A Dqcom_tlmm_pin.c78 if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { in qcom_tlmm_pin_configure()
79 pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); in qcom_tlmm_pin_configure()
80 if (flags & GPIO_PIN_OUTPUT) { in qcom_tlmm_pin_configure()
87 pin->gp_flags |= GPIO_PIN_OUTPUT; in qcom_tlmm_pin_configure()
181 *flags |= GPIO_PIN_OUTPUT; in qcom_tlmm_pin_getflags()
/src/sys/arm/ti/am335x/
H A Dam335x_gpio.c86 if (flags & GPIO_PIN_OUTPUT) { in am335x_gpio_set_flags()
114 *flags = GPIO_PIN_OUTPUT; in am335x_gpio_get_flags()
117 *flags = GPIO_PIN_OUTPUT | GPIO_PIN_PULLUP; in am335x_gpio_get_flags()
/src/sys/arm/freescale/vybrid/
H A Dvf_gpio.c70 #define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
145 GPIO_PIN_OUTPUT: GPIO_PIN_INPUT; in vf_gpio_attach()
299 if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { in vf_gpio_pin_configure()
300 pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); in vf_gpio_pin_configure()
301 if (flags & GPIO_PIN_OUTPUT) { in vf_gpio_pin_configure()
302 pin->gp_flags |= GPIO_PIN_OUTPUT; in vf_gpio_pin_configure()
/src/sys/arm64/rockchip/
H A Drk_grf_gpio.c73 *flags = GPIO_PIN_OUTPUT; in rk_grf_gpio_pin_getflags()
82 if (flags != GPIO_PIN_OUTPUT) in rk_grf_gpio_pin_setflags()
94 *caps = GPIO_PIN_OUTPUT; in rk_grf_gpio_pin_getcaps()
147 *flags = GPIO_PIN_OUTPUT; in rk_grf_gpio_map_gpios()
/src/sys/dev/gpio/
H A Dgpiospi.c157 GPIO_PIN_OUTPUT|GPIO_PIN_PULLDOWN); in gpio_spi_attach()
159 GPIO_PIN_OUTPUT|GPIO_PIN_PULLDOWN); in gpio_spi_attach()
166 GPIO_PIN_OUTPUT|GPIO_PIN_PULLUP); in gpio_spi_attach()
170 GPIO_PIN_OUTPUT|GPIO_PIN_PULLUP); in gpio_spi_attach()
173 GPIO_PIN_OUTPUT|GPIO_PIN_PULLUP); in gpio_spi_attach()
176 GPIO_PIN_OUTPUT|GPIO_PIN_PULLUP); in gpio_spi_attach()
H A Dqoriq_gpio.c118 else if (flags & GPIO_PIN_OUTPUT) { in qoriq_gpio_pin_configure()
144 if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) == in qoriq_gpio_pin_setflags()
145 (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) in qoriq_gpio_pin_setflags()
297 newflags[i] = GPIO_PIN_OUTPUT; in qoriq_gpio_pin_config_32()
H A Dchvgpio.c195 *caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in chvgpio_pin_getcaps()
218 *flags |= GPIO_PIN_OUTPUT; in chvgpio_pin_getflags()
241 allowed = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in chvgpio_pin_setflags()
260 if (flags & GPIO_PIN_OUTPUT) in chvgpio_pin_setflags()
/src/sys/dev/gpio/dwgpio/
H A Ddwgpio.c91 #define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
166 GPIO_PIN_OUTPUT: GPIO_PIN_INPUT; in dwgpio_attach()
332 if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { in dwgpio_pin_configure()
333 pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); in dwgpio_pin_configure()
334 if (flags & GPIO_PIN_OUTPUT) { in dwgpio_pin_configure()
335 pin->gp_flags |= GPIO_PIN_OUTPUT; in dwgpio_pin_configure()
/src/sys/dev/bhnd/cores/chipc/
H A Dchipc_gpio.c357 *caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_TRISTATE); in chipc_gpio_pin_getcaps()
392 *flags = GPIO_PIN_OUTPUT; in chipc_gpio_pin_getflags()
402 *flags = GPIO_PIN_TRISTATE|GPIO_PIN_OUTPUT; in chipc_gpio_pin_getflags()
561 if ((flags & (GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) == 0) in chipc_gpio_pin_config_32()
684 if (flags & GPIO_PIN_OUTPUT) in chipc_gpio_pin_update()
715 mode_flag = flags & (GPIO_PIN_OUTPUT | GPIO_PIN_INPUT | in chipc_gpio_check_flags()
722 case GPIO_PIN_OUTPUT: in chipc_gpio_check_flags()
770 case (GPIO_PIN_TRISTATE|GPIO_PIN_OUTPUT): in chipc_gpio_check_flags()
/src/sys/dev/p2sb/
H A Dlewisburg_gpiocm.c166 if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) == in lbggpiocm_pin_setflags()
167 (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) in lbggpiocm_pin_setflags()
170 if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) == 0) in lbggpiocm_pin_setflags()
185 } else if (flags & GPIO_PIN_OUTPUT) { in lbggpiocm_pin_setflags()
/src/sys/arm/freescale/imx/
H A Dimx_gpio.c97 #define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \
101 #define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
540 if (flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) { in imx51_gpio_pin_configure()
541 newflags = pin->gp_flags & ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); in imx51_gpio_pin_configure()
542 if (flags & GPIO_PIN_OUTPUT) { in imx51_gpio_pin_configure()
554 newflags |= GPIO_PIN_OUTPUT; in imx51_gpio_pin_configure()
760 } else if (flags & GPIO_PIN_OUTPUT) { in imx51_gpio_pin_config_32()
854 (READ4(sc, IMX_GPIO_OE_REG) & (1U << i)) ? GPIO_PIN_OUTPUT : in imx51_gpio_attach()
/src/sys/dev/amdgpio/
H A Damdgpio.c218 if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) == 0) in amdgpio_pin_setflags()
222 if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) == in amdgpio_pin_setflags()
223 (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) in amdgpio_pin_setflags()
274 if ((sc->sc_gpio_pins[pin].gp_flags & GPIO_PIN_OUTPUT) != 0) { in amdgpio_pin_get()
493 GPIO_PIN_OUTPUT : GPIO_PIN_INPUT; in amdgpio_attach()
/src/sys/arm/broadcom/bcm2835/
H A Draspberrypi_virtgpio.c109 *caps = GPIO_PIN_OUTPUT; in rpi_virt_gpio_pin_getcaps()
120 *flags = GPIO_PIN_OUTPUT; in rpi_virt_gpio_pin_getflags()
299 = GPIO_PIN_OUTPUT; in rpi_virt_gpio_attach()
H A Draspberrypi_gpio.c52 #define RPI_FW_GPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
95 } else if (flags & GPIO_PIN_OUTPUT) { in rpi_fw_gpio_pin_configure()
112 pin->gp_flags = GPIO_PIN_OUTPUT; in rpi_fw_gpio_pin_configure()
401 sc->sc_gpio_pins[i].gp_flags = GPIO_PIN_OUTPUT; in rpi_fw_gpio_attach()
/src/sys/arm/mv/
H A Dmvebu_gpio.c161 if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) == 0) in mvebu_gpio_pin_configure()
165 pin->gp_flags &= ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); in mvebu_gpio_pin_configure()
166 if (flags & GPIO_PIN_OUTPUT) { in mvebu_gpio_pin_configure()
167 pin->gp_flags |= GPIO_PIN_OUTPUT; in mvebu_gpio_pin_configure()
780 pin->gp_caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | in mvebu_gpio_attach()
784 pin->gp_caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in mvebu_gpio_attach()
787 GPIO_PIN_OUTPUT : GPIO_PIN_INPUT; in mvebu_gpio_attach()
H A Da37x0_gpio.c131 *caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in a37x0_gpio_pin_getcaps()
147 *flags = GPIO_PIN_OUTPUT; in a37x0_gpio_pin_getflags()
165 if (flags & GPIO_PIN_OUTPUT) in a37x0_gpio_pin_setflags()
/src/sys/arm64/apple/
H A Dapple_pinctrl.c61 (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
216 else if ((flags & GPIO_PIN_OUTPUT) != 0) in apple_pinctrl_pin_configure()
274 *flags |= GPIO_PIN_OUTPUT; in apple_pinctrl_pin_getflags()
387 if (pin_flags[pin] & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) in apple_pinctrl_pin_config_32()
/src/sys/arm/xilinx/
H A Dzy7_gpio.c247 *caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_TRISTATE); in zy7_gpio_pin_getcaps()
301 *flags = (GPIO_PIN_OUTPUT | GPIO_PIN_TRISTATE); in zy7_gpio_pin_getflags()
303 *flags = GPIO_PIN_OUTPUT; in zy7_gpio_pin_getflags()
324 if ((flags & GPIO_PIN_OUTPUT) != 0) { in zy7_gpio_pin_setflags()
/src/sys/dev/nctgpio/
H A Dnctgpio.c69 #define NCT_GPIO_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \
1246 pin->gp_flags |= GPIO_PIN_OUTPUT; in nct_attach()
1319 if ((sc->pins[pin_num].gp_flags & GPIO_PIN_OUTPUT) == 0) { in nct_gpio_pin_set()
1359 if ((sc->pins[pin_num].gp_flags & GPIO_PIN_OUTPUT) == 0) { in nct_gpio_pin_toggle()
1442 if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) == in nct_gpio_pin_setflags()
1443 (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) { in nct_gpio_pin_setflags()
1459 if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) != 0) { in nct_gpio_pin_setflags()
1461 pin->gp_flags &= ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); in nct_gpio_pin_setflags()
1462 pin->gp_flags |= flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); in nct_gpio_pin_setflags()
/src/sys/dev/iicbus/gpio/
H A Dpcf8574.c64 #define PIN_CAPS (GPIO_PIN_OUTPUT | GPIO_PIN_INPUT)
224 *pflags = GPIO_PIN_OUTPUT; in pcf8574_pin_getflags()
248 if ((flags & GPIO_PIN_OUTPUT) != 0) { in pcf8574_pin_setflags()
/src/sys/arm/nvidia/
H A Dtegra_gpio.c176 if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == 0) in tegra_gpio_pin_configure()
180 pin->gp_flags &= ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); in tegra_gpio_pin_configure()
181 if (flags & GPIO_PIN_OUTPUT) { in tegra_gpio_pin_configure()
182 pin->gp_flags |= GPIO_PIN_OUTPUT; in tegra_gpio_pin_configure()
774 sc->gpio_pins[i].gp_caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | in tegra_gpio_attach()
783 GPIO_PIN_OUTPUT : GPIO_PIN_INPUT; in tegra_gpio_attach()
H A Das3722_gpio.c355 flags = GPIO_PIN_OUTPUT; in as3722_gpio_pin_getflags()
359 flags = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_OPENDRAIN; in as3722_gpio_pin_getflags()
369 flags = GPIO_PIN_OUTPUT | GPIO_PIN_PULLDOWN; in as3722_gpio_pin_getflags()
555 pin->pin_caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | in as3722_gpio_attach()

123