Searched refs:pin (Results 26 - 50 of 212) sorted by relevance

123456789

/freebsd-12-stable/sys/mips/mediatek/
H A Dmtk_gpio_v1.c182 mtk_gpio_pin_set_direction(struct mtk_gpio_softc *sc, uint32_t pin, argument
185 uint32_t regval, mask = (1u << pin);
187 if (!(sc->pins[pin].pin_caps & dir))
197 sc->pins[pin].pin_flags &= ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT);
198 sc->pins[pin].pin_flags |= dir;
204 mtk_gpio_pin_set_invert(struct mtk_gpio_softc *sc, uint32_t pin, uint32_t val) argument
206 uint32_t regval, mask = (1u << pin);
214 sc->pins[pin].pin_flags &= ~(GPIO_PIN_INVIN | GPIO_PIN_INVOUT);
215 sc->pins[pin].pin_flags |= val;
221 mtk_gpio_pin_probe(struct mtk_gpio_softc *sc, uint32_t pin) argument
370 mtk_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument
385 mtk_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument
400 mtk_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument
414 mtk_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument
436 mtk_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument
458 mtk_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument
479 mtk_gpio_pin_toggle(device_t dev, uint32_t pin) argument
584 uint32_t pin, mask, val; local
614 uint32_t pin, mask, val; local
[all...]
/freebsd-12-stable/sys/dev/gpio/
H A Dgpioc.c74 gpio_pin_t pin; member in struct:gpioc_pin_intr
104 struct gpioc_pin_intr *pin; member in struct:gpioc_pins
127 struct gpioc_cdevpriv*, uint32_t pin);
204 intr_conf->intr_res = gpio_alloc_intr_resource(intr_conf->pin->dev,
205 &intr_conf->intr_rid, RF_ACTIVE, intr_conf->pin, flags);
211 err = bus_setup_intr(intr_conf->pin->dev, intr_conf->intr_res,
217 intr_conf->pin->flags = flags;
236 err = bus_teardown_intr(intr_conf->pin->dev,
245 err = bus_release_resource(intr_conf->pin->dev, SYS_RES_IRQ,
255 intr_conf->pin
383 gpioc_get_intr_config(struct gpioc_softc *sc, struct gpioc_cdevpriv *priv, uint32_t pin) argument
408 gpioc_set_intr_config(struct gpioc_softc *sc, struct gpioc_cdevpriv *priv, uint32_t pin, uint32_t flags) argument
781 struct gpio_pin pin; local
[all...]
H A Dbytgpio.c285 #define BYGPIO_PIN_REGISTER(sc, pin, r) ((sc)->sc_pinpad_map[(pin)].reg * 16 + (r))
330 bytgpio_valid_pin(struct bytgpio_softc *sc, int pin) argument
333 if (pin >= sc->sc_npins || sc->sc_mem_res == NULL)
343 bytgpio_pad_is_gpio(struct bytgpio_softc *sc, int pin) argument
345 if ((sc->sc_pinpad_map[pin].pad_func == PADCONF_FUNC_ANY) ||
346 (sc->sc_pad_funcs[pin] == sc->sc_pinpad_map[pin].pad_func))
353 bytgpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument
358 if (bytgpio_valid_pin(sc, pin) !
369 bytgpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument
400 bytgpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument
443 bytgpio_pin_getname(device_t dev, uint32_t pin, char *name) argument
459 bytgpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument
485 bytgpio_pin_get(device_t dev, uint32_t pin, unsigned int *value) argument
517 bytgpio_pin_toggle(device_t dev, uint32_t pin) argument
559 int pin; local
[all...]
H A Dgpiobusvar.h74 int mapped; /* pin is mapped/reserved. */
75 char *name; /* pin name. */
95 struct gpiobus_pin_data *sc_pins; /* pin data */
101 uint32_t flags; /* pin flags */
102 uint32_t pin; /* pin number */ member in struct:gpiobus_pin
134 pcell_t *gpios, uint32_t *pin, uint32_t *flags)
136 return (GPIO_MAP_GPIOS(bus, dev, gparent, gcells, gpios, pin, flags));
144 /* Acquire a pin by parsing FDT data. */
155 /* Acquire a pin b
133 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...]
/freebsd-12-stable/sys/dev/extres/regulator/
H A Dregulator_fixed.c95 * The GPIO pin is registerd and reseved for first consumer, all others share
115 tmp->gpio_pin.pin == gpio_pin->pin) {
123 /* Reserve pin. */
125 rv = gpiobus_acquire_pin(busdev, gpio_pin->pin);
149 struct gpiobus_pin *pin; local
158 pin = &sc->gpio_entry->gpio_pin;
164 rv = GPIO_PIN_SET(pin->dev, pin->pin, s
190 struct gpiobus_pin *pin; local
233 struct gpiobus_pin *pin; local
264 struct gpiobus_pin *pin; local
[all...]
/freebsd-12-stable/sys/mips/atheros/ar531x/
H A Dar5315_gpio.c68 struct gpio_pin *pin, uint32_t flags);
84 static int ar5315_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps);
85 static int ar5315_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t
87 static int ar5315_gpio_pin_getname(device_t dev, uint32_t pin, char *name);
88 static int ar5315_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags);
89 static int ar5315_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value);
90 static int ar5315_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val);
91 static int ar5315_gpio_pin_toggle(device_t dev, uint32_t pin);
97 * as GPIO pin options.
112 ar5315_gpio_pin_configure(struct ar5315_gpio_softc *sc, struct gpio_pin *pin, argument
154 ar5315_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument
175 ar5315_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument
203 ar5315_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument
224 ar5315_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument
243 ar5315_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument
262 ar5315_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument
281 ar5315_gpio_pin_toggle(device_t dev, uint32_t pin) argument
[all...]
/freebsd-12-stable/sys/x86/x86/
H A Dio_apic.c67 * I/O APIC interrupt source driver. Each pin is assigned an IRQ cookie
71 * IRQs behave as PCI IRQs by default. We also assume that the pin for
72 * IRQ 0 is actually an ExtINT pin. The apic enumerators override the
152 "Enable the ExtINT pin in the first I/O APIC");
186 * switch the pin to edge-trigger and back, masking
187 * the pin during the trick.
322 * If a pin is completely invalid or if it is valid but hasn't
323 * been enabled yet, just ensure that the pin is masked.
453 * Allocate an APIC vector for this interrupt pin. Once
454 * we have a vector we program the interrupt pin
536 struct ioapic_intsrc *pin; local
732 ioapic_get_vector(void *cookie, u_int pin) argument
743 ioapic_disable_pin(void *cookie, u_int pin) argument
759 ioapic_remap_vector(void *cookie, u_int pin, int vector) argument
776 ioapic_set_bus(void *cookie, u_int pin, int bus_type) argument
797 ioapic_set_nmi(void *cookie, u_int pin) argument
820 ioapic_set_smi(void *cookie, u_int pin) argument
843 ioapic_set_extint(void *cookie, u_int pin) argument
869 ioapic_set_polarity(void *cookie, u_int pin, enum intr_polarity pol) argument
890 ioapic_set_triggermode(void *cookie, u_int pin, enum intr_trigger trigger) argument
916 struct ioapic_intsrc *pin; local
947 struct ioapic_intsrc *pin; local
[all...]
/freebsd-12-stable/contrib/wpa/wpa_supplicant/examples/
H A DopenCryptoki.conf40 pin="123456"
/freebsd-12-stable/sys/dev/acpica/
H A Dacpi_pcibvar.h36 int slot, int pin);
41 int acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
/freebsd-12-stable/sys/arm/rockchip/
H A Drk30xx_gpio.c134 rk30_gpio_get_function(struct rk30_gpio_softc *sc, uint32_t pin) argument
137 if (RK30_GPIO_READ(sc, RK30_GPIO_SWPORT_DDR) & (1U << pin))
144 rk30_gpio_set_function(struct rk30_gpio_softc *sc, uint32_t pin, uint32_t func) argument
152 data |= (1U << pin);
154 data &= ~(1U << pin);
159 rk30_gpio_set_pud(struct rk30_gpio_softc *sc, uint32_t pin, uint32_t state) argument
179 if (sc->sc_bank == 0 && pin < 12)
180 rk30_pmu_gpio_pud(pin, pud);
182 rk30_grf_gpio_pud(sc->sc_bank, pin, pud);
186 rk30_gpio_pin_configure(struct rk30_gpio_softc *sc, struct gpio_pin *pin, argument
233 rk30_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument
254 rk30_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument
275 rk30_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument
296 rk30_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument
315 rk30_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument
341 rk30_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument
363 rk30_gpio_pin_toggle(device_t dev, uint32_t pin) argument
524 int dir, flags, pin, i; local
[all...]
H A Drk30xx_grf.c124 rk30_grf_gpio_pud(uint32_t bank, uint32_t pin, uint32_t state) argument
128 offset = GRF_GPIO0B_PULL - 4 + (bank * 16) + ((pin / 8) * 4);
129 pin = (7 - (pin % 8)) * 2;
130 grf_write_4(rk30_grf_sc, offset, (0x3 << (16 + pin)) | (state << pin));
H A Drk30xx_pmu.c124 rk30_pmu_gpio_pud(uint32_t pin, uint32_t state) argument
128 offset = PMU_GPIO0A_PULL + ((pin / 8) * 4);
129 pin = (pin % 8) * 2;
130 pmu_write_4(rk30_pmu_sc, offset, (0x3 << (16 + pin)) | (state << pin));
/freebsd-12-stable/sys/arm/freescale/vybrid/
H A Dvf_gpio.c86 static int vf_gpio_pin_toggle(device_t, uint32_t pin);
182 vf_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument
189 if (sc->gpio_pins[i].gp_pin == pin)
204 vf_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument
211 if (sc->gpio_pins[i].gp_pin == pin)
226 vf_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument
233 if (sc->gpio_pins[i].gp_pin == pin)
248 vf_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument
255 if (sc->gpio_pins[i].gp_pin == pin)
270 vf_gpio_pin_toggle(device_t dev, uint32_t pin) argument
293 vf_gpio_pin_configure(struct vf_gpio_softc *sc, struct gpio_pin *pin, unsigned int flags) argument
319 vf_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument
339 vf_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument
[all...]
/freebsd-12-stable/sys/arm/allwinner/
H A Dallwinner_pinctrl.h37 uint8_t pin; member in struct:allwinner_pins
/freebsd-12-stable/contrib/wpa/wpa_supplicant/examples/p2p/
H A Dp2p_connect.py19 print(" -a <addr> [-p <pin>] [-g <go_intent>] \ ")
25 print(" -p = pin number (8 digits)")
66 global pin
79 pin,wps_method,go_intent):
86 self.pin = pin
155 # Display requires a pin, and a go intent of 15
157 if (self.pin != None):
158 self.p2p_connect_arguements.update({'pin':self.pin})
228 pin = None variable in class:P2P_Connect
[all...]
/freebsd-12-stable/usr.sbin/gpioctl/
H A Dgpioctl.c80 fprintf(stderr, "\tgpioctl [-f ctldev] [-pN] -t pin\n");
81 fprintf(stderr, "\tgpioctl [-f ctldev] [-pN] -c pin flag ...\n");
82 fprintf(stderr, "\tgpioctl [-f ctldev] [-pN] -n pin pin-name\n");
83 fprintf(stderr, "\tgpioctl [-f ctldev] [-pN] pin [0|1]\n");
152 gpio_config_t *pin; local
161 pin = cfgs + i;
162 pinv = gpio_pin_get(handle, pin->g_pin);
163 printf("pin %02d:\t%d\t%s", pin
181 gpio_config_t *pin; local
218 gpio_config_t pin; local
[all...]
/freebsd-12-stable/sys/powerpc/mpc85xx/
H A Dmpc85xx_gpio.c93 /* Get a specific pin's capabilities. */
95 mpc85xx_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument
98 if (!VALID_PIN(pin))
106 /* Get a specific pin's name. */
108 mpc85xx_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument
111 if (!VALID_PIN(pin))
114 snprintf(name, GPIOMAXNAME, "GPIO%d", pin);
120 /* Set a specific output pin's value. */
122 mpc85xx_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument
128 if (!VALID_PIN(pin) || valu
146 mpc85xx_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value) argument
160 mpc85xx_gpio_pin_toggle(device_t dev, uint32_t pin) argument
[all...]
/freebsd-12-stable/sys/arm64/rockchip/
H A Drk_gpio.c210 rk_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument
216 if (pin >= 32)
220 snprintf(name, GPIOMAXNAME, "gpio%d", pin);
227 rk_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument
236 rv = FDT_PINCTRL_IS_GPIO(sc->pinctrl, dev, pin, &is_gpio);
243 rv = FDT_PINCTRL_GET_FLAGS(sc->pinctrl, dev, pin, flags);
251 if (reg & (1 << pin))
260 rk_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument
268 rk_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument
277 rv = FDT_PINCTRL_IS_GPIO(sc->pinctrl, dev, pin,
302 rk_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument
319 rk_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument
339 rk_gpio_pin_toggle(device_t dev, uint32_t pin) argument
417 rk_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...]
/freebsd-12-stable/sys/mips/atheros/
H A Dar71xx_gpio.c74 struct gpio_pin *pin, uint32_t flags);
90 static int ar71xx_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps);
91 static int ar71xx_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t
93 static int ar71xx_gpio_pin_getname(device_t dev, uint32_t pin, char *name);
94 static int ar71xx_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags);
95 static int ar71xx_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value);
96 static int ar71xx_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val);
97 static int ar71xx_gpio_pin_toggle(device_t dev, uint32_t pin);
103 * as GPIO pin options.
190 ar71xx_gpio_pin_configure(struct ar71xx_gpio_softc *sc, struct gpio_pin *pin, argument
257 ar71xx_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument
278 ar71xx_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument
299 ar71xx_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument
320 ar71xx_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument
339 ar71xx_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument
361 ar71xx_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument
380 ar71xx_gpio_pin_toggle(device_t dev, uint32_t pin) argument
[all...]
/freebsd-12-stable/sys/arm/mv/
H A Dmvebu_gpio.c128 struct gpio_pin *pin, uint32_t val)
133 bit = GPIO_BIT(pin->gp_pin);
136 SYSCON_WRITE_4(sc->syscon, sc->offset + GPIO_REGNUM(pin->gp_pin) + reg,
141 gpio_read(struct mvebu_gpio_softc *sc, bus_size_t reg, struct gpio_pin *pin) argument
146 bit = GPIO_BIT(pin->gp_pin);
148 sc->offset + GPIO_REGNUM(pin->gp_pin) + reg);
153 mvebu_gpio_pin_configure(struct mvebu_gpio_softc *sc, struct gpio_pin *pin, argument
161 pin->gp_flags &= ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT);
163 pin->gp_flags |= GPIO_PIN_OUTPUT;
164 gpio_write(sc, GPIO_CONTROL_SET, pin,
127 gpio_write(struct mvebu_gpio_softc *sc, bus_size_t reg, struct gpio_pin *pin, uint32_t val) argument
191 mvebu_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument
205 mvebu_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument
219 mvebu_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument
233 mvebu_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument
248 mvebu_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument
265 mvebu_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument
282 mvebu_gpio_pin_toggle(device_t dev, uint32_t pin) argument
716 struct gpio_pin *pin; local
812 mvebu_gpio_map_gpios(device_t dev, phandle_t pdev, phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin, uint32_t *flags) argument
[all...]
/freebsd-12-stable/sys/powerpc/include/
H A Dintr_machdep.h36 #define MAP_IRQ(node, pin) powerpc_get_irq(node, pin)
/freebsd-12-stable/sys/i386/pci/
H A Dpci_pir.c71 int pin; member in struct:pci_link_lookup
78 int pin; member in struct:pci_dev_lookup
85 static int pci_pir_biosroute(int bus, int device, int func, int pin,
97 static uint8_t pci_pir_search_irq(int bus, int device, int pin);
193 intpin - entry->pe_intpin == lookup->pin)
219 int i, pin; local
224 for (pin = 0; pin < 4; pin++, intpin++)
261 * have an interrupt routed to intpin 'pin' b
264 pci_pir_search_irq(int bus, int device, int pin) argument
314 uint8_t irq, pin; local
474 pci_pir_biosroute(int bus, int device, int func, int pin, int irq) argument
489 pci_pir_route_interrupt(int bus, int device, int func, int pin) argument
[all...]
/freebsd-12-stable/usr.sbin/bhyve/
H A Dioapic.c80 return (16 + (4 + pi->pi_slot + pi->pi_lintr.pin) % 8);
/freebsd-12-stable/usr.sbin/bluetooth/hcsecd/
H A Dhcsecd.h47 char *pin; /* pin (or NULL if no pin) */ member in struct:link_key
/freebsd-12-stable/sys/arm/broadcom/bcm2835/
H A Dbcm2835_gpio.c97 uint32_t pin; member in struct:bcm_gpio_sysctl
171 bcm_gpio_pin_is_ro(struct bcm_gpio_softc *sc, int pin) argument
176 if (pin == sc->sc_ro_pins[i])
182 bcm_gpio_get_function(struct bcm_gpio_softc *sc, uint32_t pin) argument
186 /* Five banks, 10 pins per bank, 3 bits per pin. */
187 bank = pin / 10;
188 offset = (pin - bank * 10) * 3;
271 bcm_gpio_set_function(struct bcm_gpio_softc *sc, uint32_t pin, uint32_t f) argument
278 /* Five banks, 10 pins per bank, 3 bits per pin. */
279 bank = pin / 1
289 bcm_gpio_set_pud(struct bcm_gpio_softc *sc, uint32_t pin, uint32_t state) argument
304 bcm_gpio_set_alternate(device_t dev, uint32_t pin, uint32_t nfunc) argument
327 bcm_gpio_pin_configure(struct bcm_gpio_softc *sc, struct gpio_pin *pin, unsigned int flags) argument
384 bcm_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) argument
405 bcm_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) argument
426 bcm_gpio_pin_getname(device_t dev, uint32_t pin, char *name) argument
447 bcm_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) argument
470 bcm_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) argument
498 bcm_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) argument
520 bcm_gpio_pin_toggle(device_t dev, uint32_t pin) argument
1207 uint32_t pin; local
[all...]

Completed in 308 milliseconds

123456789