/freebsd/sys/riscv/sifive/ |
H A D | sifive_gpio.c | 50 #define SFGPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) 155 ((output_en & (1u << i)) ? GPIO_PIN_OUTPUT : 0); in sfgpio_attach() 239 if (sc->gpio_pins[pin].gp_flags & GPIO_PIN_OUTPUT) in sfgpio_pin_get() 344 if (flags & GPIO_PIN_OUTPUT) { in sfgpio_pin_setflags() 346 sc->gpio_pins[pin].gp_flags |= GPIO_PIN_OUTPUT; in sfgpio_pin_setflags() 349 sc->gpio_pins[pin].gp_flags &= ~GPIO_PIN_OUTPUT; in sfgpio_pin_setflags() 410 sc->gpio_pins[i].gp_flags &= ~GPIO_PIN_OUTPUT; in sfgpio_pin_config_32() 411 } else if (pin_flags[i] & GPIO_PIN_OUTPUT) { in sfgpio_pin_config_32() 415 sc->gpio_pins[i].gp_flags |= GPIO_PIN_OUTPUT; in sfgpio_pin_config_32()
|
/freebsd/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/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/sys/dev/qcom_tlmm/ |
H A D | qcom_tlmm_pin.c | 78 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()
|
/freebsd/sys/arm/ti/am335x/ |
H A D | am335x_gpio.c | 86 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()
|
/freebsd/sys/arm/freescale/vybrid/ |
H A D | vf_gpio.c | 70 #define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) 145 GPIO_PIN_OUTPUT: GPIO_PIN_INPUT; in vf_gpio_attach() 298 if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { in vf_gpio_pin_configure() 299 pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); in vf_gpio_pin_configure() 300 if (flags & GPIO_PIN_OUTPUT) { in vf_gpio_pin_configure() 301 pin->gp_flags |= GPIO_PIN_OUTPUT; in vf_gpio_pin_configure()
|
/freebsd/sys/arm64/rockchip/ |
H A D | rk_grf_gpio.c | 73 *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()
|
/freebsd/sys/dev/gpio/dwgpio/ |
H A D | dwgpio.c | 91 #define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) 166 GPIO_PIN_OUTPUT: GPIO_PIN_INPUT; in dwgpio_attach() 331 if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { in dwgpio_pin_configure() 332 pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); in dwgpio_pin_configure() 333 if (flags & GPIO_PIN_OUTPUT) { in dwgpio_pin_configure() 334 pin->gp_flags |= GPIO_PIN_OUTPUT; in dwgpio_pin_configure()
|
/freebsd/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 | 118 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 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 | bytgpio.c | 363 *caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in bytgpio_pin_getcaps() 387 *flags |= GPIO_PIN_OUTPUT; in bytgpio_pin_getflags() 411 allowed = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in bytgpio_pin_setflags() 434 if (flags & GPIO_PIN_OUTPUT) in bytgpio_pin_setflags()
|
/freebsd/sys/dev/bhnd/cores/chipc/ |
H A D | chipc_gpio.c | 357 *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()
|
/freebsd/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/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/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) 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()
|
/freebsd/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/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 | 131 *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()
|
/freebsd/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/sys/arm/xilinx/ |
H A D | zy7_gpio.c | 247 *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()
|
/freebsd/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/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/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 | 355 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()
|