Lines Matching refs:pin
93 /* Get a specific pin's capabilities. */
95 mpc85xx_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps)
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)
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)
128 if (!VALID_PIN(pin) || value > 1)
132 pinbit = 31 - pin;
144 /* Get a specific pin's input value. */
146 mpc85xx_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value)
150 if (!VALID_PIN(pin))
153 *value = (bus_read_4(sc->in_res, 0) >> (31 - pin)) & 1;
158 /* Toggle a pin's output value. */
160 mpc85xx_gpio_pin_toggle(device_t dev, uint32_t pin)
165 if (!VALID_PIN(pin))
171 val ^= (1 << (31 - pin));