Lines Matching +full:all +full:- +full:outputs
4 * SPDX-License-Identifier: Apache-2.0
39 const struct gpio_axp192_config *config = dev->config; in gpio_axp192_port_get_raw()
42 return -EWOULDBLOCK; in gpio_axp192_port_get_raw()
45 ret = mfd_axp192_gpio_read_port(config->mfd, &port_val); in gpio_axp192_port_get_raw()
57 const struct gpio_axp192_config *config = dev->config; in gpio_axp192_port_set_masked_raw()
60 return -EWOULDBLOCK; in gpio_axp192_port_set_masked_raw()
63 ret = mfd_axp192_gpio_write_port(config->mfd, value, mask); in gpio_axp192_port_set_masked_raw()
81 const struct gpio_axp192_config *config = dev->config; in gpio_axp192_configure()
85 if (pin >= config->ngpios) { in gpio_axp192_configure()
87 return -EINVAL; in gpio_axp192_configure()
91 return -EWOULDBLOCK; in gpio_axp192_configure()
103 ret = mfd_axp192_gpio_func_ctrl(config->mfd, dev, pin, func); in gpio_axp192_configure()
110 ret = mfd_axp192_gpio_write_port(config->mfd, BIT(pin), 0); in gpio_axp192_configure()
112 ret = mfd_axp192_gpio_write_port(config->mfd, BIT(pin), BIT(pin)); in gpio_axp192_configure()
119 ret = mfd_axp192_gpio_func_ctrl(config->mfd, dev, pin, func); in gpio_axp192_configure()
124 /* Configure pull-down */ in gpio_axp192_configure()
127 LOG_ERR("Pull-Up not supported"); in gpio_axp192_configure()
128 ret = -ENOTSUP; in gpio_axp192_configure()
130 /* out = 0 means pull-down*/ in gpio_axp192_configure()
131 ret = mfd_axp192_gpio_pd_ctrl(config->mfd, pin, true); in gpio_axp192_configure()
133 ret = mfd_axp192_gpio_pd_ctrl(config->mfd, pin, false); in gpio_axp192_configure()
138 ret = -ENOTSUP; in gpio_axp192_configure()
146 struct gpio_axp192_data *data = dev->data; in gpio_axp192_port_toggle_bits()
150 k_mutex_lock(&data->mutex, K_FOREVER); in gpio_axp192_port_toggle_bits()
157 k_mutex_unlock(&data->mutex); in gpio_axp192_port_toggle_bits()
170 return -ENOTSUP; in gpio_axp192_pin_interrupt_configure()
176 const struct gpio_axp192_config *config = dev->config; in gpio_axp192_get_config()
182 return -EWOULDBLOCK; in gpio_axp192_get_config()
185 ret = mfd_axp192_gpio_func_get(config->mfd, pin, &func); in gpio_axp192_get_config()
214 /* Query pull-down config status */ in gpio_axp192_get_config()
215 ret = mfd_axp192_gpio_pd_get(config->mfd, pin, &pd_enabled); in gpio_axp192_get_config()
230 gpio_port_pins_t *inputs, gpio_port_pins_t *outputs) in gpio_axp192_port_get_direction() argument
232 const struct gpio_axp192_config *config = dev->config; in gpio_axp192_port_get_direction()
238 *outputs = 0; in gpio_axp192_port_get_direction()
240 /* loop through all */ in gpio_axp192_port_get_direction()
241 for (gpio_pin_t gpio = 0; gpio < config->ngpios; gpio++) { in gpio_axp192_port_get_direction()
253 *outputs |= (1u << gpio); in gpio_axp192_port_get_direction()
267 struct gpio_axp192_data *const data = dev->data; in gpio_axp192_manage_callback()
269 return gpio_manage_callback(&data->cb_list_gpio, callback, set); in gpio_axp192_manage_callback()
291 const struct gpio_axp192_config *config = dev->config; in gpio_axp192_init()
292 struct gpio_axp192_data *data = dev->data; in gpio_axp192_init()
296 if (!i2c_is_ready_dt(&config->i2c)) { in gpio_axp192_init()
298 return -ENODEV; in gpio_axp192_init()
301 return k_mutex_init(&data->mutex); in gpio_axp192_init()