Lines Matching refs:mask
45 uint32_t mask; in gpio_nct38xx_pin_config() local
73 mask = BIT(pin) | ~config->pinmux_mask; in gpio_nct38xx_pin_config()
75 ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_MUX_CONTROL, mask, new_reg); in gpio_nct38xx_pin_config()
85 mask = BIT(pin); in gpio_nct38xx_pin_config()
87 mask, new_reg); in gpio_nct38xx_pin_config()
93 mask = BIT(pin); in gpio_nct38xx_pin_config()
95 new_reg = mask; in gpio_nct38xx_pin_config()
100 mask, new_reg); in gpio_nct38xx_pin_config()
107 new_reg = mask; in gpio_nct38xx_pin_config()
112 mask, new_reg); in gpio_nct38xx_pin_config()
121 mask, new_reg); in gpio_nct38xx_pin_config()
134 uint32_t mask = BIT(pin); in gpio_nct38xx_pin_get_config() local
141 if (mask & (~config->common.port_pin_mask)) { in gpio_nct38xx_pin_get_config()
151 if ((mask & config->pinmux_mask) && (mask & (~reg))) { in gpio_nct38xx_pin_get_config()
162 if (reg & mask) { in gpio_nct38xx_pin_get_config()
173 if (mask & reg) { in gpio_nct38xx_pin_get_config()
184 if (mask & reg) { in gpio_nct38xx_pin_get_config()
215 static int gpio_nct38xx_port_set_masked_raw(const struct device *dev, gpio_port_pins_t mask, in gpio_nct38xx_port_set_masked_raw() argument
225 mask, value); in gpio_nct38xx_port_set_masked_raw()
232 static int gpio_nct38xx_port_set_bits_raw(const struct device *dev, gpio_port_pins_t mask) in gpio_nct38xx_port_set_bits_raw() argument
241 mask, mask); in gpio_nct38xx_port_set_bits_raw()
248 static int gpio_nct38xx_port_clear_bits_raw(const struct device *dev, gpio_port_pins_t mask) in gpio_nct38xx_port_clear_bits_raw() argument
257 mask, 0); in gpio_nct38xx_port_clear_bits_raw()
264 static int gpio_nct38xx_port_toggle_bits(const struct device *dev, gpio_port_pins_t mask) in gpio_nct38xx_port_toggle_bits() argument
278 new_reg = reg ^ mask; in gpio_nct38xx_port_toggle_bits()
297 uint32_t mask = BIT(pin); in gpio_nct38xx_pin_interrupt_configure() local
304 mask, new_reg); in gpio_nct38xx_pin_interrupt_configure()
315 new_fall = mask; in gpio_nct38xx_pin_interrupt_configure()
317 new_rise = mask; in gpio_nct38xx_pin_interrupt_configure()
320 new_rise = mask; in gpio_nct38xx_pin_interrupt_configure()
321 new_fall = mask; in gpio_nct38xx_pin_interrupt_configure()
333 mask, new_rise); in gpio_nct38xx_pin_interrupt_configure()
339 mask, new_fall); in gpio_nct38xx_pin_interrupt_configure()
349 new_reg = mask; in gpio_nct38xx_pin_interrupt_configure()
356 NCT38XX_REG_GPIO_ALERT_LEVEL(config->gpio_port), mask, in gpio_nct38xx_pin_interrupt_configure()
366 mask); in gpio_nct38xx_pin_interrupt_configure()
372 new_reg = mask; in gpio_nct38xx_pin_interrupt_configure()
374 mask, new_reg); in gpio_nct38xx_pin_interrupt_configure()
391 static int gpio_nct38xx_port_get_direction(const struct device *dev, gpio_port_pins_t mask, in gpio_nct38xx_port_get_direction() argument
405 mask &= (enabled_gpios & config->common.port_pin_mask); in gpio_nct38xx_port_get_direction()
420 *inputs = mask & (~dir_reg); in gpio_nct38xx_port_get_direction()
424 *outputs = mask & dir_reg; in gpio_nct38xx_port_get_direction()
437 uint8_t alert_pins, mask; in gpio_nct38xx_dispatch_port_isr() local
450 NCT38XX_REG_GPIO_ALERT_MASK(config->gpio_port), &mask); in gpio_nct38xx_dispatch_port_isr()
455 alert_pins &= mask; in gpio_nct38xx_dispatch_port_isr()