drivers: interrupt_controller: ra_icu: Adding `disconnect_dynamic`
Adding `ra_icu_irq_disconnect_dynamic()` corresponds with `ra_icu_irq_connect_dynamic()`. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
This commit is contained in:
parent
75ac40e6d8
commit
bccd281b3d
|
@ -104,5 +104,23 @@ int ra_icu_irq_connect_dynamic(unsigned int irq, unsigned int priority,
|
|||
return irqn;
|
||||
}
|
||||
|
||||
int ra_icu_irq_disconnect_dynamic(unsigned int irq, unsigned int priority,
|
||||
void (*routine)(const void *parameter), const void *parameter,
|
||||
uint32_t flags)
|
||||
{
|
||||
int irqn = irq;
|
||||
|
||||
if (irq == RA_ICU_IRQ_UNSPECIFIED) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
irq_disable(irqn);
|
||||
sys_write32(0, IELSRn_REG(irqn));
|
||||
z_isr_install(irqn, z_irq_spurious, NULL);
|
||||
z_arm_irq_priority_set(irqn, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEVICE_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, PRE_KERNEL_1, CONFIG_INTC_INIT_PRIORITY,
|
||||
NULL);
|
||||
|
|
|
@ -35,4 +35,8 @@ extern int ra_icu_irq_connect_dynamic(unsigned int irq, unsigned int priority,
|
|||
void (*routine)(const void *parameter), const void *parameter,
|
||||
uint32_t flags);
|
||||
|
||||
extern int ra_icu_irq_disconnect_dynamic(unsigned int irq, unsigned int priority,
|
||||
void (*routine)(const void *parameter),
|
||||
const void *parameter, uint32_t flags);
|
||||
|
||||
#endif /* ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_RA_ICU_H_ */
|
||||
|
|
Loading…
Reference in New Issue