intc: miwu: npcx: improve interrupt latency of miwu input events
To reduce the interrupt latency of MIWU events, the driver prepares a dedicated callback function item list for each MIWU group in this PR. We needn't check the MIWU table and group of the event in ISR. And the maximum item number of each list is also limited to 8. After applying this PR, the interrupt latency reduces to ~10us consistently. Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
This commit is contained in:
parent
ac38411e2e
commit
9da9c90639
7 changed files with 118 additions and 146 deletions
|
@ -82,7 +82,7 @@ struct wdt_npcx_data {
|
|||
bool timeout_installed;
|
||||
};
|
||||
|
||||
struct miwu_dev_callback miwu_cb;
|
||||
struct miwu_callback miwu_cb;
|
||||
|
||||
/* Driver convenience defines */
|
||||
#define HAL_INSTANCE(dev) ((struct twd_reg *)((const struct wdt_npcx_config *)(dev)->config)->base)
|
||||
|
@ -153,7 +153,7 @@ static void wdt_config_t0out_interrupt(const struct device *dev)
|
|||
/* Initialize a miwu device input and its callback function */
|
||||
npcx_miwu_init_dev_callback(&miwu_cb, &config->t0out, wdt_t0out_isr,
|
||||
dev);
|
||||
npcx_miwu_manage_dev_callback(&miwu_cb, true);
|
||||
npcx_miwu_manage_callback(&miwu_cb, true);
|
||||
|
||||
/*
|
||||
* Configure the T0 wake-up event triggered from a rising edge
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue