drivers: adc: adc_sam0: Fix result ready interrupt
Atmel sam0 adc peripheral have multiple interrupt vectors for same5x devices. This configure interrupt vector by name to ensure that proper interrupt handle will be executed. Fixes #37779 Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
parent
f667b09ade
commit
bca28015e3
5 changed files with 8 additions and 3 deletions
|
@ -609,11 +609,11 @@ do { \
|
|||
&adc_sam0_api); \
|
||||
static void adc_sam0_config_##n(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
DT_INST_IRQ(n, priority), \
|
||||
IRQ_CONNECT(DT_INST_IRQ_BY_NAME(n, resrdy, irq), \
|
||||
DT_INST_IRQ_BY_NAME(n, resrdy, priority), \
|
||||
adc_sam0_isr, \
|
||||
DEVICE_DT_INST_GET(n), 0); \
|
||||
irq_enable(DT_INST_IRQN(n)); \
|
||||
irq_enable(DT_INST_IRQ_BY_NAME(n, resrdy, irq)); \
|
||||
ADC_SAM0_CONFIGURE(n); \
|
||||
}
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
|
||||
&adc {
|
||||
interrupts = <21 0>;
|
||||
interrupt-names = "resrdy";
|
||||
clocks = <&gclk 0x17>, <&pm 0x20 16>;
|
||||
clock-names = "GCLK", "PM";
|
||||
};
|
||||
|
|
|
@ -128,4 +128,5 @@
|
|||
clocks = <&gclk 0x1e>, <&pm 0x20 16>;
|
||||
clock-names = "GCLK", "PM";
|
||||
interrupts = <23 0>;
|
||||
interrupt-names = "resrdy";
|
||||
};
|
||||
|
|
|
@ -316,6 +316,7 @@
|
|||
compatible = "atmel,sam0-adc";
|
||||
reg = <0x43001C00 0x4A>;
|
||||
interrupts = <118 0>, <119 0>;
|
||||
interrupt-names = "overrun", "resrdy";
|
||||
label = "ADC_0";
|
||||
|
||||
/*
|
||||
|
@ -336,6 +337,7 @@
|
|||
compatible = "atmel,sam0-adc";
|
||||
reg = <0x43002000 0x4A>;
|
||||
interrupts = <120 0>, <121 0>;
|
||||
interrupt-names = "overrun", "resrdy";
|
||||
label = "ADC_1";
|
||||
|
||||
/*
|
||||
|
|
|
@ -133,4 +133,5 @@
|
|||
clocks = <&gclk 0x1e>, <&pm 0x20 16>;
|
||||
clock-names = "GCLK", "PM";
|
||||
interrupts = <23 0>;
|
||||
interrupt-names = "resrdy";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue