Lines Matching +full:all +full:- +full:inputs

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()
80 const struct gpio_axp192_config *config = dev->config; in gpio_axp192_configure()
84 if (pin >= config->ngpios) { in gpio_axp192_configure()
86 return -EINVAL; in gpio_axp192_configure()
90 return -EWOULDBLOCK; in gpio_axp192_configure()
102 ret = mfd_axp192_gpio_func_ctrl(config->mfd, dev, pin, func); in gpio_axp192_configure()
109 ret = mfd_axp192_gpio_write_port(config->mfd, BIT(pin), 0); in gpio_axp192_configure()
111 ret = mfd_axp192_gpio_write_port(config->mfd, BIT(pin), BIT(pin)); in gpio_axp192_configure()
118 ret = mfd_axp192_gpio_func_ctrl(config->mfd, dev, pin, func); in gpio_axp192_configure()
123 /* Configure pull-down */ in gpio_axp192_configure()
126 LOG_ERR("Pull-Up not supported"); in gpio_axp192_configure()
127 ret = -ENOTSUP; in gpio_axp192_configure()
129 /* out = 0 means pull-down*/ in gpio_axp192_configure()
130 ret = mfd_axp192_gpio_pd_ctrl(config->mfd, pin, true); in gpio_axp192_configure()
132 ret = mfd_axp192_gpio_pd_ctrl(config->mfd, pin, false); in gpio_axp192_configure()
137 ret = -ENOTSUP; in gpio_axp192_configure()
145 struct gpio_axp192_data *data = dev->data; in gpio_axp192_port_toggle_bits()
149 k_mutex_lock(&data->mutex, K_FOREVER); in gpio_axp192_port_toggle_bits()
156 k_mutex_unlock(&data->mutex); in gpio_axp192_port_toggle_bits()
169 return -ENOTSUP; in gpio_axp192_pin_interrupt_configure()
175 const struct gpio_axp192_config *config = dev->config; in gpio_axp192_get_config()
181 return -EWOULDBLOCK; in gpio_axp192_get_config()
184 ret = mfd_axp192_gpio_func_get(config->mfd, pin, &func); in gpio_axp192_get_config()
213 /* Query pull-down config status  */ in gpio_axp192_get_config()
214 ret = mfd_axp192_gpio_pd_get(config->mfd, pin, &pd_enabled); in gpio_axp192_get_config()
229 gpio_port_pins_t *inputs, gpio_port_pins_t *outputs) in gpio_axp192_port_get_direction() argument
231 const struct gpio_axp192_config *config = dev->config; in gpio_axp192_port_get_direction()
236 *inputs = 0; in gpio_axp192_port_get_direction()
239 /* loop through all */ in gpio_axp192_port_get_direction()
240 for (gpio_pin_t gpio = 0; gpio < config->ngpios; gpio++) { in gpio_axp192_port_get_direction()
254 *inputs |= (1u << gpio); in gpio_axp192_port_get_direction()
266 struct gpio_axp192_data *const data = dev->data; in gpio_axp192_manage_callback()
268 return gpio_manage_callback(&data->cb_list_gpio, callback, set); in gpio_axp192_manage_callback()
290 const struct gpio_axp192_config *config = dev->config; in gpio_axp192_init()
291 struct gpio_axp192_data *data = dev->data; in gpio_axp192_init()
295 if (!i2c_is_ready_dt(&config->i2c)) { in gpio_axp192_init()
297 return -ENODEV; in gpio_axp192_init()
300 return k_mutex_init(&data->mutex); in gpio_axp192_init()