Lines Matching +full:rx +full:- +full:inst +full:- +full:mode
4 * SPDX-License-Identifier: Apache-2.0
50 /* Disable interrupts on UART1 RX pin to avoid repeated interrupts. */ in uart1_wui_isr()
51 (void)gpio_pin_interrupt_configure(gpio, (find_msb_set(pins) - 1), in uart1_wui_isr()
54 /* Refresh console expired time if got UART Rx wake-up event */ in uart1_wui_isr()
63 k_work_reschedule(&uart_console_data->rx_refresh_timeout_work, delay); in uart1_wui_isr()
70 /* Disable interrupts on UART2 RX pin to avoid repeated interrupts. */ in uart2_wui_isr()
71 (void)gpio_pin_interrupt_configure(gpio, (find_msb_set(pins) - 1), in uart2_wui_isr()
74 /* Refresh console expired time if got UART Rx wake-up event */ in uart2_wui_isr()
83 k_work_reschedule(&uart_console_data->rx_refresh_timeout_work, delay); in uart2_wui_isr()
90 const struct uart_it8xxx2_config *const config = dev->config; in uart_it8xxx2_pm_action()
98 /* Next device power state is deep doze mode */ in uart_it8xxx2_pm_action()
101 ret = gpio_pin_interrupt_configure_dt(&config->gpio_wui, in uart_it8xxx2_pm_action()
105 config->port, ret); in uart_it8xxx2_pm_action()
111 return -ENOTSUP; in uart_it8xxx2_pm_action()
130 const struct uart_it8xxx2_config *const config = dev->config; in uart_it8xxx2_init()
134 status = pinctrl_apply_state(config->pcfg, PINCTRL_STATE_DEFAULT); in uart_it8xxx2_init()
147 * UART Rx interrupt as wakeup source and initialize a delayable in uart_it8xxx2_init()
150 if (config->uart_dev == uart_console_dev) { in uart_it8xxx2_init()
152 uart_console_data = dev->data; in uart_it8xxx2_init()
153 k_work_init_delayable(&uart_console_data->rx_refresh_timeout_work, in uart_it8xxx2_init()
159 * UART Rx interrupt as a wakeup source. When the interrupt of UART in uart_it8xxx2_init()
160 * Rx falling, EC will be woken. in uart_it8xxx2_init()
162 if (config->port == UART1) { in uart_it8xxx2_init()
166 BIT(config->gpio_wui.pin)); in uart_it8xxx2_init()
168 ret = gpio_add_callback(config->gpio_wui.port, &uart1_wui_cb); in uart_it8xxx2_init()
169 } else if (config->port == UART2) { in uart_it8xxx2_init()
173 BIT(config->gpio_wui.pin)); in uart_it8xxx2_init()
175 ret = gpio_add_callback(config->gpio_wui.port, &uart2_wui_cb); in uart_it8xxx2_init()
180 config->port, ret); in uart_it8xxx2_init()
189 #define UART_ITE_IT8XXX2_INIT(inst) \ argument
190 PINCTRL_DT_INST_DEFINE(inst); \
191 static const struct uart_it8xxx2_config uart_it8xxx2_cfg_##inst = { \
192 .port = DT_INST_PROP(inst, port_num), \
193 .gpio_wui = GPIO_DT_SPEC_INST_GET(inst, gpios), \
194 .uart_dev = DEVICE_DT_GET(DT_INST_PHANDLE(inst, uart_dev)), \
195 .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(inst), \
198 static struct uart_it8xxx2_data uart_it8xxx2_data_##inst; \
200 PM_DEVICE_DT_INST_DEFINE(inst, uart_it8xxx2_pm_action); \
201 DEVICE_DT_INST_DEFINE(inst, uart_it8xxx2_init, \
202 PM_DEVICE_DT_INST_GET(inst), \
203 &uart_it8xxx2_data_##inst, \
204 &uart_it8xxx2_cfg_##inst, \