Lines Matching refs:gpio

104 	volatile struct gpio_sifive_t *gpio = DEV_GPIO(dev);  in gpio_sifive_irq_handler()  local
124 gpio->rise_ip = BIT(pin); in gpio_sifive_irq_handler()
125 gpio->fall_ip = BIT(pin); in gpio_sifive_irq_handler()
126 gpio->high_ip = BIT(pin); in gpio_sifive_irq_handler()
127 gpio->low_ip = BIT(pin); in gpio_sifive_irq_handler()
146 volatile struct gpio_sifive_t *gpio = DEV_GPIO(dev); in gpio_sifive_config() local
159 WRITE_BIT(gpio->pue, pin, flags & GPIO_PULL_UP); in gpio_sifive_config()
165 gpio->out_val |= BIT(pin); in gpio_sifive_config()
168 gpio->out_val &= ~BIT(pin); in gpio_sifive_config()
172 WRITE_BIT(gpio->out_en, pin, flags & GPIO_OUTPUT); in gpio_sifive_config()
173 WRITE_BIT(gpio->in_en, pin, flags & GPIO_INPUT); in gpio_sifive_config()
181 volatile struct gpio_sifive_t *gpio = DEV_GPIO(dev); in gpio_sifive_port_get_raw() local
183 *value = gpio->in_val; in gpio_sifive_port_get_raw()
192 volatile struct gpio_sifive_t *gpio = DEV_GPIO(dev); in gpio_sifive_port_set_masked_raw() local
194 gpio->out_val = (gpio->out_val & ~mask) | (value & mask); in gpio_sifive_port_set_masked_raw()
202 volatile struct gpio_sifive_t *gpio = DEV_GPIO(dev); in gpio_sifive_port_set_bits_raw() local
204 gpio->out_val |= mask; in gpio_sifive_port_set_bits_raw()
212 volatile struct gpio_sifive_t *gpio = DEV_GPIO(dev); in gpio_sifive_port_clear_bits_raw() local
214 gpio->out_val &= ~mask; in gpio_sifive_port_clear_bits_raw()
222 volatile struct gpio_sifive_t *gpio = DEV_GPIO(dev); in gpio_sifive_port_toggle_bits() local
224 gpio->out_val ^= mask; in gpio_sifive_port_toggle_bits()
234 volatile struct gpio_sifive_t *gpio = DEV_GPIO(dev); in gpio_sifive_pin_interrupt_configure() local
237 gpio->rise_ie &= ~BIT(pin); in gpio_sifive_pin_interrupt_configure()
238 gpio->fall_ie &= ~BIT(pin); in gpio_sifive_pin_interrupt_configure()
239 gpio->high_ie &= ~BIT(pin); in gpio_sifive_pin_interrupt_configure()
240 gpio->low_ie &= ~BIT(pin); in gpio_sifive_pin_interrupt_configure()
249 gpio->high_ip = BIT(pin); in gpio_sifive_pin_interrupt_configure()
250 gpio->high_ie |= BIT(pin); in gpio_sifive_pin_interrupt_configure()
253 gpio->low_ip = BIT(pin); in gpio_sifive_pin_interrupt_configure()
254 gpio->low_ie |= BIT(pin); in gpio_sifive_pin_interrupt_configure()
263 gpio->rise_ip = BIT(pin); in gpio_sifive_pin_interrupt_configure()
264 gpio->rise_ie |= BIT(pin); in gpio_sifive_pin_interrupt_configure()
267 gpio->fall_ip = BIT(pin); in gpio_sifive_pin_interrupt_configure()
268 gpio->fall_ie |= BIT(pin); in gpio_sifive_pin_interrupt_configure()
309 static DEVICE_API(gpio, gpio_sifive_driver) = {
334 volatile struct gpio_sifive_t *gpio = DEV_GPIO(dev); in gpio_sifive_init() local
338 gpio->in_en = 0U; in gpio_sifive_init()
339 gpio->out_en = 0U; in gpio_sifive_init()
340 gpio->pue = 0U; in gpio_sifive_init()
341 gpio->rise_ie = 0U; in gpio_sifive_init()
342 gpio->fall_ie = 0U; in gpio_sifive_init()
343 gpio->high_ie = 0U; in gpio_sifive_init()
344 gpio->low_ie = 0U; in gpio_sifive_init()
345 gpio->iof_en = 0U; in gpio_sifive_init()
346 gpio->iof_sel = 0U; in gpio_sifive_init()
347 gpio->invert = 0U; in gpio_sifive_init()