Lines Matching +full:pullup +full:- +full:mask
4 * SPDX-License-Identifier: Apache-2.0
13 #include <zephyr/dt-bindings/gpio/ite-it8xxx2-gpio.h>
42 const struct gpio_kscan_cfg *const config = dev->config; in gpio_kscan_it8xxx2_configure()
43 volatile uint8_t *reg_ksi_kso_gctrl = config->reg_ksi_kso_gctrl; in gpio_kscan_it8xxx2_configure()
44 volatile uint8_t *reg_ksi_kso_goen = config->reg_ksi_kso_goen; in gpio_kscan_it8xxx2_configure()
45 volatile uint8_t *reg_ksi_kso_gdat = config->reg_ksi_kso_gdat; in gpio_kscan_it8xxx2_configure()
46 volatile uint8_t *reg_ksi_kso_gpod = config->reg_ksi_kso_gpod; in gpio_kscan_it8xxx2_configure()
47 uint8_t mask = BIT(pin); in gpio_kscan_it8xxx2_configure() local
53 return -ENOTSUP; in gpio_kscan_it8xxx2_configure()
57 *reg_ksi_kso_gctrl |= mask; in gpio_kscan_it8xxx2_configure()
65 /* Set open-drain and enable internal pullup */ in gpio_kscan_it8xxx2_configure()
66 *reg_ksi_kso_gpod |= mask; in gpio_kscan_it8xxx2_configure()
68 /* Set push-pull and disable internal pullup */ in gpio_kscan_it8xxx2_configure()
69 *reg_ksi_kso_gpod &= ~mask; in gpio_kscan_it8xxx2_configure()
76 *reg_ksi_kso_gdat |= mask; in gpio_kscan_it8xxx2_configure()
78 *reg_ksi_kso_gdat &= ~mask; in gpio_kscan_it8xxx2_configure()
84 *reg_ksi_kso_goen |= mask; in gpio_kscan_it8xxx2_configure()
87 *reg_ksi_kso_goen &= ~mask; in gpio_kscan_it8xxx2_configure()
90 /* Enable internal pullup */ in gpio_kscan_it8xxx2_configure()
91 *reg_ksi_kso_gpod |= mask; in gpio_kscan_it8xxx2_configure()
93 /* No internal pullup and pulldown */ in gpio_kscan_it8xxx2_configure()
94 *reg_ksi_kso_gpod &= ~mask; in gpio_kscan_it8xxx2_configure()
106 const struct gpio_kscan_cfg *const config = dev->config; in gpio_kscan_it8xxx2_get_config()
107 volatile uint8_t *reg_ksi_kso_goen = config->reg_ksi_kso_goen; in gpio_kscan_it8xxx2_get_config()
108 volatile uint8_t *reg_ksi_kso_gdat = config->reg_ksi_kso_gdat; in gpio_kscan_it8xxx2_get_config()
109 volatile uint8_t *reg_ksi_kso_gpod = config->reg_ksi_kso_gpod; in gpio_kscan_it8xxx2_get_config()
110 uint8_t mask = BIT(pin); in gpio_kscan_it8xxx2_get_config() local
117 if (*reg_ksi_kso_goen & mask) { in gpio_kscan_it8xxx2_get_config()
120 /* Open-drain or push-pull */ in gpio_kscan_it8xxx2_get_config()
121 if (*reg_ksi_kso_gpod & mask) { in gpio_kscan_it8xxx2_get_config()
126 if (*reg_ksi_kso_gdat & mask) { in gpio_kscan_it8xxx2_get_config()
134 /* pullup or no pull */ in gpio_kscan_it8xxx2_get_config()
135 if (*reg_ksi_kso_gpod & mask) { in gpio_kscan_it8xxx2_get_config()
149 const struct gpio_kscan_cfg *const config = dev->config; in gpio_kscan_it8xxx2_port_get_raw()
150 volatile uint8_t *reg_ksi_kso_gdmr = config->reg_ksi_kso_gdmr; in gpio_kscan_it8xxx2_port_get_raw()
159 gpio_port_pins_t mask, in gpio_kscan_it8xxx2_port_set_masked_raw() argument
162 const struct gpio_kscan_cfg *const config = dev->config; in gpio_kscan_it8xxx2_port_set_masked_raw()
163 volatile uint8_t *reg_ksi_kso_gdat = config->reg_ksi_kso_gdat; in gpio_kscan_it8xxx2_port_set_masked_raw()
167 /* Set high/low level to mask pins of the port */ in gpio_kscan_it8xxx2_port_set_masked_raw()
168 *reg_ksi_kso_gdat = ((out & ~mask) | (value & mask)); in gpio_kscan_it8xxx2_port_set_masked_raw()
178 const struct gpio_kscan_cfg *const config = dev->config; in gpio_kscan_it8xxx2_port_set_bits_raw()
179 volatile uint8_t *reg_ksi_kso_gdat = config->reg_ksi_kso_gdat; in gpio_kscan_it8xxx2_port_set_bits_raw()
193 const struct gpio_kscan_cfg *const config = dev->config; in gpio_kscan_it8xxx2_port_clear_bits_raw()
194 volatile uint8_t *reg_ksi_kso_gdat = config->reg_ksi_kso_gdat; in gpio_kscan_it8xxx2_port_clear_bits_raw()
208 const struct gpio_kscan_cfg *const config = dev->config; in gpio_kscan_it8xxx2_port_toggle_bits()
209 volatile uint8_t *reg_ksi_kso_gdat = config->reg_ksi_kso_gdat; in gpio_kscan_it8xxx2_port_toggle_bits()