/freebsd/sys/arm/ti/omap4/ |
H A D | omap4_gpio.c | 84 else if (flags & GPIO_PIN_INPUT) { in omap4_gpio_set_flags() 113 *flags = GPIO_PIN_INPUT; in omap4_gpio_get_flags() 116 *flags = GPIO_PIN_INPUT | GPIO_PIN_PULLUP; in omap4_gpio_get_flags() 119 *flags = GPIO_PIN_INPUT | GPIO_PIN_PULLDOWN; in omap4_gpio_get_flags()
|
/freebsd/sys/arm/ti/am335x/ |
H A D | am335x_gpio.c | 91 } else if (flags & GPIO_PIN_INPUT) { in am335x_gpio_set_flags() 120 *flags = GPIO_PIN_INPUT; in am335x_gpio_get_flags() 123 *flags = GPIO_PIN_INPUT | GPIO_PIN_PULLUP; in am335x_gpio_get_flags() 126 *flags = GPIO_PIN_INPUT | GPIO_PIN_PULLDOWN; in am335x_gpio_get_flags()
|
/freebsd/sys/riscv/sifive/ |
H A D | sifive_gpio.c | 50 #define SFGPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) 154 ((input_en & (1u << i)) ? GPIO_PIN_INPUT : 0) | in sfgpio_attach() 334 if (flags & GPIO_PIN_INPUT) { in sfgpio_pin_setflags() 336 sc->gpio_pins[pin].gp_flags |= GPIO_PIN_INPUT; in sfgpio_pin_setflags() 339 sc->gpio_pins[pin].gp_flags &= ~GPIO_PIN_INPUT; in sfgpio_pin_setflags() 406 if (pin_flags[i] & GPIO_PIN_INPUT) { in sfgpio_pin_config_32() 409 sc->gpio_pins[i].gp_flags |= GPIO_PIN_INPUT; in sfgpio_pin_config_32() 414 sc->gpio_pins[i].gp_flags &= ~GPIO_PIN_INPUT; in sfgpio_pin_config_32()
|
/freebsd/sys/dev/gpio/ |
H A D | gpioiic.c | 194 gpio_pin_setflags(sc->sdapin, GPIO_PIN_INPUT); in gpioiic_setsda() 208 gpio_pin_setflags(sc->sclpin, GPIO_PIN_INPUT); in gpioiic_setscl() 222 gpio_pin_setflags(sc->sclpin, GPIO_PIN_INPUT); in gpioiic_getscl() 233 gpio_pin_setflags(sc->sdapin, GPIO_PIN_INPUT); in gpioiic_getsda() 244 gpio_pin_setflags(sc->sdapin, GPIO_PIN_INPUT); in gpioiic_reset() 245 gpio_pin_setflags(sc->sclpin, GPIO_PIN_INPUT); in gpioiic_reset()
|
H A D | qoriq_gpio.c | 113 if (flags & GPIO_PIN_INPUT) { 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() 293 if (pin_flags[i] & GPIO_PIN_INPUT) { in qoriq_gpio_pin_config_32() 294 newflags[i] = GPIO_PIN_INPUT; in qoriq_gpio_pin_config_32()
|
H A D | chvgpio.c | 195 *caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in chvgpio_pin_getcaps() 222 *flags |= GPIO_PIN_INPUT; in chvgpio_pin_getflags() 241 allowed = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in chvgpio_pin_setflags() 258 if (flags & GPIO_PIN_INPUT) in chvgpio_pin_setflags()
|
H A D | bytgpio.c | 363 *caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in bytgpio_pin_getcaps() 393 *flags |= GPIO_PIN_INPUT; in bytgpio_pin_getflags() 411 allowed = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in bytgpio_pin_setflags() 432 if (flags & GPIO_PIN_INPUT) in bytgpio_pin_setflags()
|
H A D | qoriq_gpio.h | 34 #define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \
|
H A D | gpioths.c | 152 gpio_pin_setflags(sc->pin, GPIO_PIN_INPUT); in gpioths_dht_initread() 353 err = gpio_pin_setflags(sc->pin, GPIO_PIN_INPUT); in gpioths_attach()
|
/freebsd/sys/dev/ftgpio/ |
H A D | ftgpio.c | 73 #define FTGPIO_GPIO_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_INVIN | \ 201 if ((pin_flags & (GPIO_PIN_OUTPUT | GPIO_PIN_INPUT)) == 0) { in ftgpio_pin_read() 214 ((pin_flags & (GPIO_PIN_INPUT |GPIO_PIN_INVIN )) == (GPIO_PIN_INPUT |GPIO_PIN_INVIN))) 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() 320 if (pin_flags & GPIO_PIN_INPUT) in ftgpio_pin_setflags() 381 pin->gp_flags |= GPIO_PIN_INPUT; in ftgpio_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() 91 pin->gp_flags |= GPIO_PIN_INPUT; in qcom_tlmm_pin_configure() 183 *flags |= GPIO_PIN_INPUT; in qcom_tlmm_pin_getflags()
|
/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() 304 pin->gp_flags |= GPIO_PIN_INPUT; in vf_gpio_pin_configure()
|
/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() 337 pin->gp_flags |= GPIO_PIN_INPUT; in dwgpio_pin_configure()
|
/freebsd/sys/arm/broadcom/bcm2835/ |
H A D | raspberrypi_gpio.c | 52 #define RPI_FW_GPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) 91 if (flags & GPIO_PIN_INPUT) { in rpi_fw_gpio_pin_configure() 94 pin->gp_flags = GPIO_PIN_INPUT; in rpi_fw_gpio_pin_configure() 399 sc->sc_gpio_pins[i].gp_flags = GPIO_PIN_INPUT; in rpi_fw_gpio_attach() 403 sc->sc_gpio_pins[i].gp_flags = GPIO_PIN_INPUT; in rpi_fw_gpio_attach()
|
/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() 182 if (flags & GPIO_PIN_INPUT) { in lbggpiocm_pin_setflags()
|
/freebsd/sys/arm/nvidia/ |
H A D | as3722_gpio.c | 351 flags = GPIO_PIN_INPUT; in as3722_gpio_pin_getflags() 359 flags = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_OPENDRAIN; in as3722_gpio_pin_getflags() 365 flags = GPIO_PIN_INPUT | GPIO_PIN_PULLUP; in as3722_gpio_pin_getflags() 399 if (gpio_flags & GPIO_PIN_INPUT) { in as3722_gpio_get_mode() 555 pin->pin_caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | in as3722_gpio_attach()
|
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() 185 pin->gp_flags |= GPIO_PIN_INPUT; 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()
|
/freebsd/sys/dev/amdgpio/ |
H A D | amdgpio.c | 207 allowed = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; in amdgpio_pin_setflags() 227 if (flags & GPIO_PIN_INPUT) { in amdgpio_pin_setflags() 229 sc->sc_gpio_pins[pin].gp_flags = GPIO_PIN_INPUT; in amdgpio_pin_setflags() 408 GPIO_PIN_OUTPUT : GPIO_PIN_INPUT; in amdgpio_attach()
|
/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() 558 newflags |= GPIO_PIN_INPUT; in imx51_gpio_pin_configure() 758 if (flags & GPIO_PIN_INPUT) { in imx51_gpio_pin_config_32() 855 GPIO_PIN_INPUT; in imx51_gpio_attach()
|
/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() 380 *flags = GPIO_PIN_INPUT; in chipc_gpio_pin_getflags() 561 if ((flags & (GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) == 0) in chipc_gpio_pin_config_32() 715 mode_flag = flags & (GPIO_PIN_OUTPUT | GPIO_PIN_INPUT | in chipc_gpio_check_flags() 746 case GPIO_PIN_INPUT: in chipc_gpio_check_flags()
|
/freebsd/sys/dev/iicbus/gpio/ |
H A D | pcf8574.c | 64 #define PIN_CAPS (GPIO_PIN_OUTPUT | GPIO_PIN_INPUT) 227 *pflags = GPIO_PIN_INPUT; in pcf8574_pin_getflags() 252 } else if ((flags & GPIO_PIN_INPUT) != 0) { in pcf8574_pin_setflags()
|
/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() 170 pin->gp_flags |= GPIO_PIN_INPUT; 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() 149 *flags = GPIO_PIN_INPUT; in a37x0_gpio_pin_getflags()
|
/freebsd/sys/dev/nctgpio/ |
H A D | nctgpio.c | 69 #define NCT_GPIO_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ 1244 pin->gp_flags |= GPIO_PIN_INPUT; in nct_attach() 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() 1459 nct_set_pin_input(sc, pin_num, (flags & GPIO_PIN_INPUT) != 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/arm64/rockchip/ |
H A D | rk_gpio.c | 74 #define RK_GPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ 463 *flags |= GPIO_PIN_INPUT; in rk_gpio_pin_getflags() 498 …if (__predict_false((flags & GPIO_PIN_INPUT) && ((flags & GPIO_FLAGS_PINCTRL) != sc->pin_cached[pi… in rk_gpio_pin_setflags() 506 if (flags & GPIO_PIN_INPUT) in rk_gpio_pin_setflags() 618 if (flags & GPIO_PIN_INPUT) { in rk_gpio_pin_config_32()
|