Lines Matching +full:pin +full:- +full:offset
4 * SPDX-License-Identifier: Apache-2.0
18 #define DEV_CFG(dev) ((const struct gpio_brcmstb_config *)(dev)->config)
19 #define DEV_DATA(dev) ((struct gpio_brcmstb_data *)(dev)->data)
25 mem_addr_t offset; member
35 static int gpio_brcmstb_pin_configure(const struct device *port, gpio_pin_t pin, gpio_flags_t flags) in gpio_brcmstb_pin_configure() argument
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()
134 .offset = DT_INST_REG_ADDR(n), \