Lines Matching refs:port
97 static int gpio_atcgpio100_config(const struct device *port, in gpio_atcgpio100_config() argument
101 struct gpio_atcgpio100_data * const data = port->data; in gpio_atcgpio100_config()
119 sys_write32(pin_mask, GPIO_DSET(port)); in gpio_atcgpio100_config()
121 sys_write32(pin_mask, GPIO_DCLR(port)); in gpio_atcgpio100_config()
127 port_value = sys_read32(GPIO_DIR(port)); in gpio_atcgpio100_config()
128 sys_write32((port_value | pin_mask), GPIO_DIR(port)); in gpio_atcgpio100_config()
145 sys_write32(DF_DEBOUNCED_SETTING, GPIO_DEBC(port)); in gpio_atcgpio100_config()
146 port_value = sys_read32(GPIO_DEBE(port)); in gpio_atcgpio100_config()
147 sys_write32((port_value | pin_mask), GPIO_DEBE(port)); in gpio_atcgpio100_config()
151 port_value = sys_read32(GPIO_DIR(port)); in gpio_atcgpio100_config()
152 sys_write32((port_value & ~pin_mask), GPIO_DIR(port)); in gpio_atcgpio100_config()
163 static int gpio_atcgpio100_port_get_raw(const struct device *port, in gpio_atcgpio100_port_get_raw() argument
166 *value = sys_read32(GPIO_DIN(port)); in gpio_atcgpio100_port_get_raw()
170 static int gpio_atcgpio100_set_masked_raw(const struct device *port, in gpio_atcgpio100_set_masked_raw() argument
174 struct gpio_atcgpio100_data * const data = port->data; in gpio_atcgpio100_set_masked_raw()
179 port_value = sys_read32(GPIO_DOUT(port)); in gpio_atcgpio100_set_masked_raw()
180 sys_write32((port_value & ~mask) | (value & mask), GPIO_DOUT(port)); in gpio_atcgpio100_set_masked_raw()
187 static int gpio_atcgpio100_set_bits_raw(const struct device *port, in gpio_atcgpio100_set_bits_raw() argument
190 sys_write32(pins, GPIO_DSET(port)); in gpio_atcgpio100_set_bits_raw()
194 static int gpio_atcgpio100_clear_bits_raw(const struct device *port, in gpio_atcgpio100_clear_bits_raw() argument
197 sys_write32(pins, GPIO_DCLR(port)); in gpio_atcgpio100_clear_bits_raw()
201 static int gpio_atcgpio100_toggle_bits(const struct device *port, in gpio_atcgpio100_toggle_bits() argument
204 struct gpio_atcgpio100_data * const data = port->data; in gpio_atcgpio100_toggle_bits()
209 port_value = sys_read32(GPIO_DOUT(port)); in gpio_atcgpio100_toggle_bits()
210 sys_write32((port_value ^ pins), GPIO_DOUT(port)); in gpio_atcgpio100_toggle_bits()
218 const struct device *port, in gpio_atcgpio100_pin_interrupt_configure() argument
223 struct gpio_atcgpio100_data * const data = port->data; in gpio_atcgpio100_pin_interrupt_configure()
255 port_value = sys_read32(GPIO_INTE(port)); in gpio_atcgpio100_pin_interrupt_configure()
256 sys_write32((port_value & ~BIT(pin)), GPIO_INTE(port)); in gpio_atcgpio100_pin_interrupt_configure()
259 port_value = sys_read32(GPIO_ISTA(port)); in gpio_atcgpio100_pin_interrupt_configure()
260 sys_write32(port_value, GPIO_ISTA(port)); in gpio_atcgpio100_pin_interrupt_configure()
263 port_value = sys_read32(GPIO_IMD(port, imr_idx)); in gpio_atcgpio100_pin_interrupt_configure()
265 sys_write32(port_value, GPIO_IMD(port, imr_idx)); in gpio_atcgpio100_pin_interrupt_configure()
268 port_value = sys_read32(GPIO_INTE(port)); in gpio_atcgpio100_pin_interrupt_configure()
269 sys_write32((port_value | BIT(pin)), GPIO_INTE(port)); in gpio_atcgpio100_pin_interrupt_configure()
277 static int gpio_atcgpio100_manage_callback(const struct device *port, in gpio_atcgpio100_manage_callback() argument
282 struct gpio_atcgpio100_data * const data = port->data; in gpio_atcgpio100_manage_callback()
288 static int gpio_atcgpio100_port_get_dir(const struct device *port, in gpio_atcgpio100_port_get_dir() argument
293 const struct gpio_atcgpio100_config * const dev_cfg = port->config; in gpio_atcgpio100_port_get_dir()
294 uint32_t direction = sys_read32(GPIO_DIR(port)); in gpio_atcgpio100_port_get_dir()
310 static void gpio_atcgpio100_irq_handler(const struct device *port) in gpio_atcgpio100_irq_handler() argument
312 struct gpio_atcgpio100_data * const data = port->data; in gpio_atcgpio100_irq_handler()
315 port_value = sys_read32(GPIO_ISTA(port)); in gpio_atcgpio100_irq_handler()
316 sys_write32(port_value, GPIO_ISTA(port)); in gpio_atcgpio100_irq_handler()
318 gpio_fire_callbacks(&data->cb, port, port_value); in gpio_atcgpio100_irq_handler()
336 static int gpio_atcgpio100_init(const struct device *port) in gpio_atcgpio100_init() argument
338 const struct gpio_atcgpio100_config * const dev_cfg = port->config; in gpio_atcgpio100_init()
341 sys_write32(BIT_MASK(0), GPIO_INTE(port)); in gpio_atcgpio100_init()
344 sys_write32((uint32_t) BIT64_MASK(32), GPIO_ISTA(port)); in gpio_atcgpio100_init()