Lines Matching +full:zephyr +full:- +full:base
4 * SPDX-License-Identifier: Apache-2.0
9 #include <zephyr/arch/common/sys_bitops.h>
10 #include <zephyr/arch/cpu.h>
11 #include <zephyr/device.h>
12 #include <zephyr/drivers/gpio.h>
13 #include <zephyr/drivers/gpio/gpio_utils.h>
18 #define DEV_CFG(dev) ((const struct gpio_brcmstb_config *)(dev)->config)
19 #define DEV_DATA(dev) ((struct gpio_brcmstb_data *)(dev)->data)
32 mem_addr_t base; member
37 struct gpio_brcmstb_data *data = port->data; in gpio_brcmstb_pin_configure()
40 return -ENOTSUP; in gpio_brcmstb_pin_configure()
44 sys_set_bit(data->base + GIO_IODIR, pin); in gpio_brcmstb_pin_configure()
46 sys_clear_bit(data->base + GIO_IODIR, pin); in gpio_brcmstb_pin_configure()
49 sys_set_bit(data->base + GIO_DATA, pin); in gpio_brcmstb_pin_configure()
51 sys_clear_bit(data->base + GIO_DATA, pin); in gpio_brcmstb_pin_configure()
60 struct gpio_brcmstb_data *data = port->data; in gpio_brcmstb_port_get_raw()
62 *value = sys_read32(data->base + GIO_DATA); in gpio_brcmstb_port_get_raw()
70 struct gpio_brcmstb_data *data = port->data; in gpio_brcmstb_port_set_masked_raw()
72 sys_clear_bits(data->base + GIO_DATA, mask); in gpio_brcmstb_port_set_masked_raw()
73 sys_set_bits(data->base + GIO_DATA, (value & mask)); in gpio_brcmstb_port_set_masked_raw()
80 struct gpio_brcmstb_data *data = port->data; in gpio_brcmstb_port_set_bits_raw()
82 sys_set_bits(data->base + GIO_DATA, pins); in gpio_brcmstb_port_set_bits_raw()
89 struct gpio_brcmstb_data *data = port->data; in gpio_brcmstb_port_clear_bits_raw()
91 sys_clear_bits(data->base + GIO_DATA, pins); in gpio_brcmstb_port_clear_bits_raw()
98 struct gpio_brcmstb_data *data = port->data; in gpio_brcmstb_port_toggle_bits()
101 reg_data = sys_read32(data->base + GIO_DATA); in gpio_brcmstb_port_toggle_bits()
103 sys_write32(reg_data, data->base + GIO_DATA); in gpio_brcmstb_port_toggle_bits()
119 const struct gpio_brcmstb_config *config = port->config; in gpio_brcmstb_init()
120 struct gpio_brcmstb_data *data = port->data; in gpio_brcmstb_init()
123 data->base = DEVICE_MMIO_NAMED_GET(port, reg_base) + config->offset; in gpio_brcmstb_init()