Lines Matching +full:alert +full:- +full:config

4  * SPDX-License-Identifier: Apache-2.0
18 /* Alert GPIO pin */
24 /* Alert pin callback */
31 const struct mfd_it8801_config *config = dev->config; in it8801_check_vendor_id() local
35 /* Verify vendor ID registers(16-bits). */ in it8801_check_vendor_id()
37 ret = i2c_reg_read_byte_dt(&config->i2c_dev, it8801_id_verify[i].reg, &val); in it8801_check_vendor_id()
48 return -ENODEV; in it8801_check_vendor_id()
60 k_work_submit(&data->gpio_isr_worker); in it8801_gpio_callback()
66 struct mfd_it8801_data *data = mfd->data; in mfd_it8801_register_interrupt_callback()
68 sys_slist_append(&data->callback_list, &callback->node); in mfd_it8801_register_interrupt_callback()
76 SYS_SLIST_FOR_EACH_CONTAINER(&data->callback_list, cb_entry, node) { in it8801_gpio_alert_worker()
77 cb_entry->cb(cb_entry->dev); in it8801_gpio_alert_worker()
83 const struct mfd_it8801_config *config = dev->config; in mfd_it8801_init() local
84 struct mfd_it8801_data *data = dev->data; in mfd_it8801_init()
87 if (!i2c_is_ready_dt(&config->i2c_dev)) { in mfd_it8801_init()
88 LOG_ERR("I2C bus %s is not ready", config->i2c_dev.bus->name); in mfd_it8801_init()
89 return -ENODEV; in mfd_it8801_init()
99 k_work_init(&data->gpio_isr_worker, it8801_gpio_alert_worker); in mfd_it8801_init()
101 sys_slist_init(&data->callback_list); in mfd_it8801_init()
103 /* Alert response enable */ in mfd_it8801_init()
104 ret = i2c_reg_write_byte_dt(&config->i2c_dev, IT8801_REG_SMBCR, IT8801_REG_MASK_ARE); in mfd_it8801_init()
110 gpio_pin_configure_dt(&config->irq_gpios, GPIO_INPUT); in mfd_it8801_init()
113 gpio_init_callback(&data->gpio_cb, it8801_gpio_callback, BIT(config->irq_gpios.pin)); in mfd_it8801_init()
115 ret = gpio_add_callback(config->irq_gpios.port, &data->gpio_cb); in mfd_it8801_init()
120 gpio_pin_interrupt_configure_dt(&config->irq_gpios, GPIO_INT_MODE_EDGE | GPIO_INT_TRIG_LOW); in mfd_it8801_init()