| /freebsd-14.2/sys/riscv/sifive/ |
| H A D | sifive_gpio.c | 51 #define SFGPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) 156 ((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()
|
| /freebsd-14.2/sys/dev/ftgpio/ |
| H A D | ftgpio.c | 73 #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() 450 if ((sc->pins[pin_num].gp_flags & GPIO_PIN_OUTPUT) == 0) { in ftgpio_gpio_pin_set()
|
| /freebsd-14.2/sys/dev/rccgpio/ |
| H A D | rccgpio.c | 59 { .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()
|
| /freebsd-14.2/sys/dev/qcom_tlmm/ |
| H A D | qcom_tlmm_pin.c | 79 if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { in qcom_tlmm_pin_configure() 80 pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); in qcom_tlmm_pin_configure() 81 if (flags & GPIO_PIN_OUTPUT) { in qcom_tlmm_pin_configure() 88 pin->gp_flags |= GPIO_PIN_OUTPUT; in qcom_tlmm_pin_configure() 182 *flags |= GPIO_PIN_OUTPUT; in qcom_tlmm_pin_getflags()
|
| /freebsd-14.2/sys/arm/ti/am335x/ |
| H A D | am335x_gpio.c | 87 if (flags & GPIO_PIN_OUTPUT) { in am335x_gpio_set_flags() 115 *flags = GPIO_PIN_OUTPUT; in am335x_gpio_get_flags() 118 *flags = GPIO_PIN_OUTPUT | GPIO_PIN_PULLUP; in am335x_gpio_get_flags()
|
| /freebsd-14.2/sys/arm/freescale/vybrid/ |
| H A D | vf_gpio.c | 71 #define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) 146 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()
|
| /freebsd-14.2/sys/dev/gpio/ |
| H A D | gpiospi.c | 157 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 D | qoriq_gpio.c | 119 else if (flags & GPIO_PIN_OUTPUT) { in qoriq_gpio_pin_configure() 145 if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) == in qoriq_gpio_pin_setflags() 146 (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) in qoriq_gpio_pin_setflags() 298 newflags[i] = GPIO_PIN_OUTPUT; in qoriq_gpio_pin_config_32()
|
| H A D | chvgpio.c | 195 *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()
|
| H A D | pl061.c | 79 #define PL061_ALLOWED_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_INTR_EDGE_BOTH | \ 127 *flags |= GPIO_PIN_OUTPUT; in pl061_pin_getflags() 163 const uint32_t in_out = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); in pl061_pin_setflags() 178 mask_and_set(sc, PL061_DIR, mask, flags & GPIO_PIN_OUTPUT ? mask : 0); in pl061_pin_setflags()
|
| H A D | bytgpio.c | 361 *caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in bytgpio_pin_getcaps() 385 *flags |= GPIO_PIN_OUTPUT; in bytgpio_pin_getflags() 409 allowed = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in bytgpio_pin_setflags() 432 if (flags & GPIO_PIN_OUTPUT) in bytgpio_pin_setflags()
|
| /freebsd-14.2/sys/dev/gpio/dwgpio/ |
| H A D | dwgpio.c | 92 #define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) 167 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()
|
| /freebsd-14.2/sys/dev/bhnd/cores/chipc/ |
| H A D | chipc_gpio.c | 358 *caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_TRISTATE); in chipc_gpio_pin_getcaps() 393 *flags = GPIO_PIN_OUTPUT; in chipc_gpio_pin_getflags() 403 *flags = GPIO_PIN_TRISTATE|GPIO_PIN_OUTPUT; in chipc_gpio_pin_getflags() 562 if ((flags & (GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) == 0) in chipc_gpio_pin_config_32() 685 if (flags & GPIO_PIN_OUTPUT) in chipc_gpio_pin_update() 716 mode_flag = flags & (GPIO_PIN_OUTPUT | GPIO_PIN_INPUT | in chipc_gpio_check_flags() 723 case GPIO_PIN_OUTPUT: in chipc_gpio_check_flags() 771 case (GPIO_PIN_TRISTATE|GPIO_PIN_OUTPUT): in chipc_gpio_check_flags()
|
| /freebsd-14.2/sys/arm/ti/omap4/ |
| H A D | omap4_gpio.c | 82 if (flags & GPIO_PIN_OUTPUT) in omap4_gpio_set_flags() 110 *flags = GPIO_PIN_OUTPUT; in omap4_gpio_get_flags()
|
| /freebsd-14.2/sys/dev/p2sb/ |
| H A D | lewisburg_gpiocm.c | 166 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()
|
| /freebsd-14.2/sys/arm/freescale/imx/ |
| H A D | imx_gpio.c | 97 #define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ 101 #define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) 539 if (flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) { in imx51_gpio_pin_configure() 540 newflags = pin->gp_flags & ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); in imx51_gpio_pin_configure() 541 if (flags & GPIO_PIN_OUTPUT) { in imx51_gpio_pin_configure() 553 newflags |= GPIO_PIN_OUTPUT; in imx51_gpio_pin_configure() 759 } else if (flags & GPIO_PIN_OUTPUT) { in imx51_gpio_pin_config_32() 853 (READ4(sc, IMX_GPIO_OE_REG) & (1U << i)) ? GPIO_PIN_OUTPUT : in imx51_gpio_attach()
|
| /freebsd-14.2/sys/dev/amdgpio/ |
| H A D | amdgpio.c | 207 allowed = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in amdgpio_pin_setflags() 232 sc->sc_gpio_pins[pin].gp_flags = GPIO_PIN_OUTPUT; in amdgpio_pin_setflags() 264 if ((sc->sc_gpio_pins[pin].gp_flags & GPIO_PIN_OUTPUT) != 0) { in amdgpio_pin_get() 408 GPIO_PIN_OUTPUT : GPIO_PIN_INPUT; in amdgpio_attach()
|
| /freebsd-14.2/sys/arm/mv/ |
| H A D | mvebu_gpio.c | 161 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 D | a37x0_gpio.c | 132 *caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in a37x0_gpio_pin_getcaps() 148 *flags = GPIO_PIN_OUTPUT; in a37x0_gpio_pin_getflags() 166 if (flags & GPIO_PIN_OUTPUT) in a37x0_gpio_pin_setflags()
|
| /freebsd-14.2/sys/arm/xilinx/ |
| H A D | zy7_gpio.c | 248 *caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_TRISTATE); in zy7_gpio_pin_getcaps() 302 *flags = (GPIO_PIN_OUTPUT | GPIO_PIN_TRISTATE); in zy7_gpio_pin_getflags() 304 *flags = GPIO_PIN_OUTPUT; in zy7_gpio_pin_getflags() 325 if ((flags & GPIO_PIN_OUTPUT) != 0) { in zy7_gpio_pin_setflags()
|
| /freebsd-14.2/sys/arm/broadcom/bcm2835/ |
| H A D | raspberrypi_gpio.c | 52 #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()
|
| /freebsd-14.2/sys/dev/nctgpio/ |
| H A D | nctgpio.c | 69 #define NCT_GPIO_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ 1246 pin->gp_flags |= GPIO_PIN_OUTPUT; in nct_attach() 1318 if ((sc->pins[pin_num].gp_flags & GPIO_PIN_OUTPUT) == 0) { in nct_gpio_pin_set() 1358 if ((sc->pins[pin_num].gp_flags & GPIO_PIN_OUTPUT) == 0) { in nct_gpio_pin_toggle() 1441 if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) == in nct_gpio_pin_setflags() 1442 (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) { in nct_gpio_pin_setflags() 1458 if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) != 0) { in nct_gpio_pin_setflags() 1460 pin->gp_flags &= ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); in nct_gpio_pin_setflags() 1461 pin->gp_flags |= flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); in nct_gpio_pin_setflags()
|
| /freebsd-14.2/sys/dev/iicbus/gpio/ |
| H A D | pcf8574.c | 64 #define PIN_CAPS (GPIO_PIN_OUTPUT | GPIO_PIN_INPUT) 225 *pflags = GPIO_PIN_OUTPUT; in pcf8574_pin_getflags() 249 if ((flags & GPIO_PIN_OUTPUT) != 0) { in pcf8574_pin_setflags()
|
| /freebsd-14.2/sys/arm/nvidia/ |
| H A D | tegra_gpio.c | 176 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 D | as3722_gpio.c | 356 flags = GPIO_PIN_OUTPUT; in as3722_gpio_pin_getflags() 360 flags = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_OPENDRAIN; in as3722_gpio_pin_getflags() 370 flags = GPIO_PIN_OUTPUT | GPIO_PIN_PULLDOWN; in as3722_gpio_pin_getflags() 556 pin->pin_caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | in as3722_gpio_attach()
|