/freebsd-12-stable/usr.sbin/bluetooth/hcsecd/ |
H A D | hcsecd.conf | 19 # pin "secret" | nopin ; - to PIN code for the device 40 pin nopin; 47 pin "0000"; 54 pin nopin;
|
/freebsd-12-stable/sys/arm/include/ |
H A D | fdt.h | 45 #define FDT_MAP_IRQ(node, pin) (pin)
|
/freebsd-12-stable/sys/arm/freescale/imx/ |
H A D | imx_iomuxvar.h | 35 void iomux_set_function(u_int pin, u_int fn); 36 void iomux_set_pad(u_int pin, u_int cfg); 37 u_int iomux_get_pad_config(u_int pin); 42 * with IO pin assignments or pad control. These functions let other soc level
|
/freebsd-12-stable/usr.sbin/bhyve/ |
H A D | pci_irq.h | 43 int pirq_irq(int pin); 44 uint8_t pirq_read(int pin); 45 void pirq_write(struct vmctx *ctx, int pin, uint8_t val);
|
H A D | pci_irq.c | 51 * Implement an 8 pin PCI interrupt router compatible with the router 77 * Returns true if this pin is enabled with a valid IRQ. Setting the 79 * if the pin was disabled. 91 pirq_read(int pin) argument 94 assert(pin > 0 && pin <= nitems(pirqs)); 95 return (pirqs[pin - 1].reg); 99 pirq_write(struct vmctx *ctx, int pin, uint8_t val) argument 103 assert(pin > 0 && pin < 201 int best_count, best_irq, best_pin, irq, pin; local 243 pirq_irq(int pin) argument 255 int irq, pin; local [all...] |
/freebsd-12-stable/sys/arm/mv/ |
H A D | gpio.c | 103 int pin; member in struct:mv_gpio_pindev 313 if (OF_getencprop(node, "pin-count", &pincnt, sizeof(pcell_t)) >= 0 || 319 device_printf(dev, "ERROR: no pin-count or ngpios entry found!\n"); 326 /* Assign generic capabilities to every gpio pin */ 411 void (*hand)(void *), void *arg, int pin, int flags, void **cookiep) 420 if (pin < 0 || pin >= sc->pin_num) 422 event = sc->gpio_events[pin]; 425 if (sc->gpio_setup[pin].gp_flags & MV_GPIO_IN_DEBOUNCE) { 426 error = mv_gpio_debounce_init(dev, pin); 410 mv_gpio_setup_intrhandler(device_t dev, const char *name, driver_filter_t *filt, void (*hand)(void *), void *arg, int pin, int flags, void **cookiep) argument 505 int i, pin; local 529 mv_gpio_intr_handler(device_t dev, int pin) argument 552 mv_gpio_configure(device_t dev, uint32_t pin, uint32_t flags, uint32_t mask) argument 608 mv_gpio_double_edge_init(device_t dev, int pin) argument 625 mv_gpio_debounce_setup(device_t dev, int pin) argument 647 mv_gpio_debounce_prepare(device_t dev, int pin) argument 668 mv_gpio_debounce_init(device_t dev, int pin) argument 694 mv_gpio_debounce_start(device_t dev, int pin) argument 731 int pin; local 792 mv_gpio_debounced_state_set(device_t dev, int pin, uint8_t new_state) argument 813 mv_gpio_debounced_state_get(device_t dev, int pin) argument 831 mv_gpio_out(device_t dev, uint32_t pin, uint8_t val, uint8_t enable) argument 845 mv_gpio_in(device_t dev, uint32_t pin) argument 888 mv_gpio_reg_set(device_t dev, uint32_t reg, uint32_t pin) argument 898 mv_gpio_reg_clear(device_t dev, uint32_t reg, uint32_t pin) argument 908 mv_gpio_out_en(device_t dev, uint32_t pin, uint8_t enable) argument 926 mv_gpio_blink(device_t dev, uint32_t pin, uint8_t enable) argument 944 mv_gpio_polarity(device_t dev, uint32_t pin, uint8_t enable, uint8_t toggle) argument 968 mv_gpio_level(device_t dev, uint32_t pin, uint8_t enable) argument 986 mv_gpio_edge(device_t dev, uint32_t pin, uint8_t enable) argument 1006 uint32_t reg, pin; local 1020 mv_gpio_value_get(device_t dev, uint32_t pin, uint8_t exclude_polar) argument 1042 mv_gpio_value_set(device_t dev, uint32_t pin, uint8_t val) argument 1079 mv_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 1096 mv_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument 1113 mv_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 1130 mv_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 1147 mv_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument 1161 mv_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value) argument 1178 mv_gpio_pin_toggle(device_t dev, uint32_t pin) argument 1203 mv_gpio_map_gpios(device_t bus, phandle_t dev, phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin, uint32_t *flags) argument [all...] |
H A D | a37x0_gpio.c | 115 a37x0_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 120 if (pin >= sc->sc_npins) 122 snprintf(name, GPIOMAXNAME, "pin %d", pin); 128 a37x0_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 133 if (pin >= sc->sc_npins) 141 a37x0_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument 147 if (pin >= sc->sc_npins) 149 reg = A37X0_GPIO_READ(sc, A37X0_GPIO_OUT_EN(pin)); 150 if ((reg & A37X0_GPIO_BIT(pin)) ! 159 a37x0_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 179 a37x0_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument 199 a37x0_gpio_pin_set(device_t dev, uint32_t pin, unsigned int val) argument 219 a37x0_gpio_pin_toggle(device_t dev, uint32_t pin) argument [all...] |
/freebsd-12-stable/sys/arm/xilinx/ |
H A D | zy7_gpio.c | 37 * available as a GPIO pin. Pins 64-127 are sent to the PL (FPGA) section of 137 /* Get a specific pin's capabilities. */ 139 zy7_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 142 if (!VALID_PIN(pin)) 150 /* Get a specific pin's name. */ 152 zy7_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 155 if (!VALID_PIN(pin)) 158 if (pin < NUM_MIO_PINS) { 159 snprintf(name, GPIOMAXNAME, "MIO_%d", pin); 162 snprintf(name, GPIOMAXNAME, "EMIO_%d", pin 171 zy7_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument 197 zy7_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 234 zy7_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument 256 zy7_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value) argument 270 zy7_gpio_pin_toggle(device_t dev, uint32_t pin) argument [all...] |
/freebsd-12-stable/contrib/wpa/wpa_supplicant/examples/ |
H A D | wps-ap-cli | 18 read pin 19 cpin=`$CLI wps_check_pin "$pin" | tail -1` 26 cpin=`echo "$pin" | sed "s/[^1234567890]//g"` 34 echo "Invalid PIN: $pin"
|
/freebsd-12-stable/lib/libgpio/ |
H A D | gpio.c | 122 gpio_pin_set_name(gpio_handle_t handle, gpio_pin_t pin, char *name) argument 129 gppin.gp_pin = pin; 153 gpio_pin_get(gpio_handle_t handle, gpio_pin_t pin) argument 158 gpreq.gp_pin = pin; 166 gpio_pin_set(gpio_handle_t handle, gpio_pin_t pin, gpio_value_t value) argument 173 gpreq.gp_pin = pin; 182 gpio_pin_toggle(gpio_handle_t handle, gpio_pin_t pin) argument 187 gpreq.gp_pin = pin; 195 gpio_pin_low(gpio_handle_t handle, gpio_pin_t pin) argument 197 return (gpio_pin_set(handle, pin, GPIO_VALUE_LO 201 gpio_pin_high(gpio_handle_t handle, gpio_pin_t pin) argument 207 gpio_pin_set_flag(gpio_handle_t handle, gpio_pin_t pin, uint32_t flag) argument 221 gpio_pin_input(gpio_handle_t handle, gpio_pin_t pin) argument 227 gpio_pin_output(gpio_handle_t handle, gpio_pin_t pin) argument 233 gpio_pin_opendrain(gpio_handle_t handle, gpio_pin_t pin) argument 239 gpio_pin_pushpull(gpio_handle_t handle, gpio_pin_t pin) argument 245 gpio_pin_tristate(gpio_handle_t handle, gpio_pin_t pin) argument 251 gpio_pin_pullup(gpio_handle_t handle, gpio_pin_t pin) argument 257 gpio_pin_pulldown(gpio_handle_t handle, gpio_pin_t pin) argument 263 gpio_pin_invin(gpio_handle_t handle, gpio_pin_t pin) argument 269 gpio_pin_invout(gpio_handle_t handle, gpio_pin_t pin) argument 275 gpio_pin_pulsate(gpio_handle_t handle, gpio_pin_t pin) argument [all...] |
/freebsd-12-stable/sys/dev/amdgpio/ |
H A D | amdgpio.c | 78 amdgpio_is_pin_output(struct amdgpio_softc *sc, uint32_t pin) argument 83 /* Get the current pin state */ 86 reg = AMDGPIO_PIN_REGISTER(pin); 124 amdgpio_valid_pin(struct amdgpio_softc *sc, int pin) argument 126 dprintf("pin %d\n", pin); 130 if ((sc->sc_gpio_pins[pin].gp_pin == pin) && 131 (sc->sc_gpio_pins[pin].gp_caps != 0)) 138 amdgpio_pin_getname(device_t dev, uint32_t pin, cha argument 158 amdgpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 176 amdgpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument 199 amdgpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 249 amdgpio_pin_get(device_t dev, uint32_t pin, unsigned int *value) argument 287 amdgpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument 321 amdgpio_pin_toggle(device_t dev, uint32_t pin) argument 367 int i, pin, bank; local [all...] |
/freebsd-12-stable/sys/dev/rccgpio/ |
H A D | rccgpio.c | 54 uint32_t pin; member in struct:rcc_gpio_pin 60 { .pin = (1 << 11), .name = "reset switch", .caps = GPIO_PIN_INPUT }, 61 { .pin = (1 << 15), .name = "red LED", .caps = GPIO_PIN_OUTPUT }, 62 { .pin = (1 << 17), .name = "green LED", .caps = GPIO_PIN_OUTPUT }, 64 { .pin = (1 << 16), .name = "HD1 LED", .caps = GPIO_PIN_OUTPUT }, 65 { .pin = (1 << 18), .name = "HD2 LED", .caps = GPIO_PIN_OUTPUT }, 124 rcc_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 129 if (pin >= sc->sc_gpio_npins) 132 *caps = rcc_pins[pin].caps; 138 rcc_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_ argument 153 rcc_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 167 rcc_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 181 rcc_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument 204 rcc_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument 225 rcc_gpio_pin_toggle(device_t dev, uint32_t pin) argument [all...] |
/freebsd-12-stable/sys/amd64/vmm/io/ |
H A D | vioapic.c | 64 int acnt; /* sum of pin asserts (+1) and deasserts (-1) */ 99 vioapic_send_intr(struct vioapic *vioapic, int pin) argument 105 KASSERT(pin >= 0 && pin < REDIR_ENTRIES, 106 ("vioapic_set_pinstate: invalid pin number %d", pin)); 111 low = vioapic->rtbl[pin].reg; 112 high = vioapic->rtbl[pin].reg >> 32; 115 VIOAPIC_CTR1(vioapic, "ioapic pin%d: masked", pin); 131 vioapic_set_pinstate(struct vioapic *vioapic, int pin, bool newstate) argument 236 int delmode, pin, vector; local 273 int regnum, pin, rshift; local 310 int regnum, pin, lshift; local 443 int pin; local [all...] |
H A D | vatpic.c | 79 int acnt[8]; /* sum of pin asserts and deasserts */ 115 static void vatpic_set_pinstate(struct vatpic *vatpic, int pin, bool newstate); 130 int bit, pin; local 133 ATPIC_PIN_FOREACH(pin, atpic, i) { 134 bit = (1 << pin); 144 return (pin); 155 int bit, pin, tmp; local 175 ATPIC_PIN_FOREACH(pin, atpic, tmp) { 176 bit = 1 << pin; 187 * the corresponding 'pin' t 200 int pin; local 417 vatpic_set_pinstate(struct vatpic *vatpic, int pin, bool newstate) argument 555 int pin; local 583 vatpic_pin_accepted(struct atpic *atpic, int pin) argument 602 int pin; local 630 int pin; local [all...] |
/freebsd-12-stable/sys/arm/allwinner/ |
H A D | aw_gpio.c | 265 uint32_t pin; member in struct:gpio_irqsrc 328 static int aw_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value); 329 static int aw_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value); 330 static int aw_gpio_pin_get_locked(struct aw_gpio_softc *sc, uint32_t pin, unsigned int *value); 331 static int aw_gpio_pin_set_locked(struct aw_gpio_softc *sc, uint32_t pin, unsigned int value); 345 aw_gpio_get_function(struct aw_gpio_softc *sc, uint32_t pin) argument 352 if (pin > sc->conf->padconf->npins) 354 bank = sc->conf->padconf->pins[pin].port; 355 pin = sc->conf->padconf->pins[pin] 364 aw_gpio_set_function(struct aw_gpio_softc *sc, uint32_t pin, uint32_t f) argument 388 aw_gpio_get_pud(struct aw_gpio_softc *sc, uint32_t pin) argument 405 aw_gpio_set_pud(struct aw_gpio_softc *sc, uint32_t pin, uint32_t state) argument 426 aw_gpio_get_drv(struct aw_gpio_softc *sc, uint32_t pin) argument 443 aw_gpio_set_drv(struct aw_gpio_softc *sc, uint32_t pin, uint32_t drive) argument 464 aw_gpio_pin_configure(struct aw_gpio_softc *sc, uint32_t pin, uint32_t flags) argument 532 aw_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 548 aw_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument 590 aw_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 606 aw_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 623 aw_gpio_pin_set_locked(struct aw_gpio_softc *sc, uint32_t pin, unsigned int value) argument 647 aw_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument 662 aw_gpio_pin_get_locked(struct aw_gpio_softc *sc,uint32_t pin, unsigned int *val) argument 751 aw_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument 766 aw_gpio_pin_toggle(device_t dev, uint32_t pin) argument 795 uint32_t bank, data, pin; local 830 uint32_t bank, pin; local 858 aw_gpio_map_gpios(device_t bus, phandle_t dev, phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin, uint32_t *flags) argument 891 aw_find_pin_func(struct aw_gpio_softc *sc, int pin, const char *func) argument 1170 int pin; local 1260 int pin; local [all...] |
/freebsd-12-stable/sys/arm/nvidia/ |
H A D | as3722_gpio.c | 151 int rv, fnc, pin; local 153 for (pin = 0; pin < sc->gpio_npins; pin++) { 154 if (strcmp(sc->gpio_pins[pin]->pin_name, pin_name) == 0) 157 if (pin >= sc->gpio_npins) { 158 device_printf(sc->dev, "Unknown pin: %s\n", pin_name); 162 ctrl = sc->gpio_pins[pin]->pin_ctrl_reg; 163 sc->gpio_pins[pin]->pin_cfg_flags = cfg->flags; 168 "Unknown function %s for pin 306 as3722_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 320 as3722_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 334 as3722_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *out_flags) argument 386 as3722_gpio_get_mode(struct as3722_softc *sc, uint32_t pin, uint32_t gpio_flags) argument 430 as3722_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 461 as3722_gpio_pin_set(device_t dev, uint32_t pin, uint32_t val) argument 482 as3722_gpio_pin_get(device_t dev, uint32_t pin, uint32_t *val) argument 511 as3722_gpio_pin_toggle(device_t dev, uint32_t pin) argument 534 as3722_gpio_map_gpios(device_t dev, phandle_t pdev, phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin, uint32_t *flags) argument 548 struct as3722_gpio_pin *pin; local [all...] |
/freebsd-12-stable/sys/gnu/dts/include/dt-bindings/pinctrl/ |
H A D | r7s9210-pinctrl.h | 3 * Defines macros and constants for Renesas RZ/A2 pin controller pin 37 * Create the pin index from its bank and position numbers and store in 43 * Convert a port and pin label to its global pin index 45 #define RZA2_PIN(port, pin) ((port) * RZA2_PINS_PER_PORT + (pin))
|
/freebsd-12-stable/sys/arm/amlogic/aml8726/ |
H A D | aml8726_gpio.c | 115 if (OF_getencprop(node, "pin-count", 117 device_printf(dev, "missing pin-count attribute in FDT\n"); 185 /* Get a specific pin's capabilities. */ 187 aml8726_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 191 if (pin >= sc->npins) 199 /* Get a specific pin's name. */ 201 aml8726_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 205 if (pin >= sc->npins) 208 snprintf(name, GPIOMAXNAME, "%s.%u", ofw_bus_get_name(dev), pin); 213 /* Get a specific pin' 215 aml8726_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument 235 aml8726_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 262 aml8726_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument 290 aml8726_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value) argument 305 aml8726_gpio_pin_toggle(device_t dev, uint32_t pin) argument [all...] |
/freebsd-12-stable/sys/dev/gpio/ |
H A D | chvgpio.c | 114 chvgpio_pad_cfg0_offset(int pin) argument 116 return (CHVGPIO_PAD_CFG0 + 1024 * (pin / 15) + 8 * (pin % 15)); 120 chvgpio_read_pad_cfg0(struct chvgpio_softc *sc, int pin) argument 122 return bus_read_4(sc->sc_mem_res, chvgpio_pad_cfg0_offset(pin)); 126 chvgpio_write_pad_cfg0(struct chvgpio_softc *sc, int pin, uint32_t val) argument 128 bus_write_4(sc->sc_mem_res, chvgpio_pad_cfg0_offset(pin), val); 132 chvgpio_read_pad_cfg1(struct chvgpio_softc *sc, int pin) argument 134 return bus_read_4(sc->sc_mem_res, chvgpio_pad_cfg0_offset(pin) + 4); 160 chvgpio_valid_pin(struct chvgpio_softc *sc, int pin) argument 172 chvgpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 187 chvgpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 203 chvgpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument 233 chvgpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 271 chvgpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument 293 chvgpio_pin_get(device_t dev, uint32_t pin, unsigned int *value) argument 317 chvgpio_pin_toggle(device_t dev, uint32_t pin) argument [all...] |
H A D | gpiobus.c | 101 gpio_pin_t pin, uint32_t intr_mode) 109 gpio_data->gpio_pin_num = pin->pin; 110 gpio_data->gpio_pin_flags = pin->flags; 113 irq = intr_map_irq(pin->dev, 0, (struct intr_map_data *)gpio_data); 126 gpio_pin_t pin, uint32_t intr_mode) 162 gpio_pin_t pin; local 169 pin = malloc(sizeof(*pin), M_DEVBUF, M_WAITOK | M_ZERO); 171 pin 100 gpio_alloc_intr_resource(device_t consumer_dev, int *rid, u_int alloc_flags, gpio_pin_t pin, uint32_t intr_mode) argument 125 gpio_alloc_intr_resource(device_t consumer_dev, int *rid, u_int alloc_flags, gpio_pin_t pin, uint32_t intr_mode) argument 193 gpio_pin_getcaps(gpio_pin_t pin, uint32_t *caps) argument 202 gpio_pin_is_active(gpio_pin_t pin, bool *active) argument 239 gpio_pin_set_active(gpio_pin_t pin, bool active) argument 256 gpio_pin_setflags(gpio_pin_t pin, uint32_t flags) argument 402 gpiobus_acquire_pin(device_t bus, uint32_t pin) argument 425 gpiobus_release_pin(device_t bus, uint32_t pin) argument 512 unsigned long pin; local 970 gpiobus_pin_setflags(device_t dev, device_t child, uint32_t pin, uint32_t flags) argument 988 gpiobus_pin_getflags(device_t dev, device_t child, uint32_t pin, uint32_t *flags) argument 1001 gpiobus_pin_getcaps(device_t dev, device_t child, uint32_t pin, uint32_t *caps) argument 1014 gpiobus_pin_set(device_t dev, device_t child, uint32_t pin, unsigned int value) argument 1027 gpiobus_pin_get(device_t dev, device_t child, uint32_t pin, unsigned int *value) argument 1040 gpiobus_pin_toggle(device_t dev, device_t child, uint32_t pin) argument 1052 gpiobus_pin_getname(device_t dev, uint32_t pin, char *name) argument 1070 gpiobus_pin_setname(device_t dev, uint32_t pin, const char *name) argument [all...] |
/freebsd-12-stable/sys/arm/ralink/ |
H A D | rt1310_gpio.c | 34 * Pins are mapped to logical pin number as follows: 208 rt1310_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 212 if (pin > RT_GPIO_NPINS) 215 map = rt1310_gpio_get_pinmap(pin); 222 rt1310_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument 229 if (pin > RT_GPIO_NPINS) 232 map = rt1310_gpio_get_pinmap(pin); 234 /* Check whether it's bidirectional pin */ 244 dir = (state & (1 << RT_GPIO_PIN_BIT(map, pin))); 248 dir = (state & (1 << RT_GPIO_PIN_BIT(map, pin))); 260 rt1310_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 304 rt1310_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 312 rt1310_gpio_pin_get(device_t dev, uint32_t pin, uint32_t *value) argument 345 rt1310_gpio_pin_set(device_t dev, uint32_t pin, uint32_t value) argument 381 rt1310_gpio_pin_toggle(device_t dev, uint32_t pin) argument 401 rt1310_gpio_get_pinmap(int pin) argument 415 rt1310_gpio_set_flags(device_t dev, int pin, int flags) argument 424 rt1310_gpio_set_state(device_t dev, int pin, int state) argument 433 rt1310_gpio_get_state(device_t dev, int pin, int *state) argument [all...] |
/freebsd-12-stable/sys/mips/cavium/ |
H A D | octeon_gpio.c | 64 int pin; member in struct:octeon_gpio_pin 81 struct gpio_pin *pin, uint32_t flags); 98 static int octeon_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps); 99 static int octeon_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t 101 static int octeon_gpio_pin_getname(device_t dev, uint32_t pin, char *name); 102 static int octeon_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags); 103 static int octeon_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value); 104 static int octeon_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val); 105 static int octeon_gpio_pin_toggle(device_t dev, uint32_t pin); 108 octeon_gpio_pin_configure(struct octeon_gpio_softc *sc, struct gpio_pin *pin, argument 160 octeon_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 181 octeon_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument 202 octeon_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 223 octeon_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 242 octeon_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument 266 octeon_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument 289 octeon_gpio_pin_toggle(device_t dev, uint32_t pin) argument [all...] |
/freebsd-12-stable/sys/mips/mediatek/ |
H A D | mtk_gpio_v2.c | 173 mtk_gpio_pin_set_direction(struct mtk_gpio_softc *sc, uint32_t pin, argument 176 uint32_t regval, mask = (1u << pin); 178 if (!(sc->pins[pin].pin_caps & dir)) 188 sc->pins[pin].pin_flags &= ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); 189 sc->pins[pin].pin_flags |= dir; 195 mtk_gpio_pin_set_invert(struct mtk_gpio_softc *sc, uint32_t pin, uint32_t val) argument 197 uint32_t regval, mask = (1u << pin); 205 sc->pins[pin].pin_flags &= ~(GPIO_PIN_INVIN | GPIO_PIN_INVOUT); 206 sc->pins[pin].pin_flags |= val; 212 mtk_gpio_pin_probe(struct mtk_gpio_softc *sc, uint32_t pin) argument 360 mtk_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 375 mtk_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument 390 mtk_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 404 mtk_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 426 mtk_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument 448 mtk_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument 469 mtk_gpio_pin_toggle(device_t dev, uint32_t pin) argument 524 uint32_t pin, mask, val; local 554 uint32_t pin, mask, val; local [all...] |
/freebsd-12-stable/sys/mips/ingenic/ |
H A D | jz4780_gpio.c | 136 jz4780_gpio_pin_set_func(struct jz4780_gpio_softc *sc, uint32_t pin, argument 139 uint32_t mask = (1u << pin); 155 sc->pins[pin].pin_flags &= ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); 156 sc->pins[pin].pin_func = (enum pin_function)func; 162 uint32_t pin, uint32_t dir) 164 uint32_t mask = (1u << pin); 168 if (sc->pins[pin].pin_caps & dir) 174 if (sc->pins[pin].pin_caps & dir) 181 sc->pins[pin].pin_flags &= ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); 182 sc->pins[pin] 161 jz4780_gpio_pin_set_direction(struct jz4780_gpio_softc *sc, uint32_t pin, uint32_t dir) argument 187 jz4780_gpio_pin_set_bias(struct jz4780_gpio_softc *sc, uint32_t pin, uint32_t bias) argument 231 jz4780_gpio_pin_probe(struct jz4780_gpio_softc *sc, uint32_t pin) argument 385 jz4780_gpio_configure_pin(device_t dev, uint32_t pin, uint32_t func, uint32_t flags) argument 422 jz4780_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 438 jz4780_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument 454 jz4780_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 469 jz4780_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 490 jz4780_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument 513 jz4780_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument 532 jz4780_gpio_pin_toggle(device_t dev, uint32_t pin) argument 660 struct jz4780_gpio_pin *pin; local 721 struct jz4780_gpio_pin *pin; local 733 struct jz4780_gpio_pin *pin; local 759 struct jz4780_gpio_pin *pin; local [all...] |
/freebsd-12-stable/sys/powerpc/mpc85xx/ |
H A D | qoriq_gpio.c | 96 /* Get a specific pin's capabilities. */ 98 qoriq_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument 101 if (!VALID_PIN(pin)) 109 /* Get a specific pin's name. */ 111 qoriq_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument 114 if (!VALID_PIN(pin)) 118 device_get_unit(dev), pin); 124 /* Set flags for the pin. */ 126 qoriq_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument 131 if (!VALID_PIN(pin)) 161 qoriq_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument 185 qoriq_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value) argument 199 qoriq_gpio_pin_toggle(device_t dev, uint32_t pin) argument [all...] |