drivers: adc: Convert drivers to new DT device macros
Convert adc drivers to use new DT variants of the DEVICE APIs. DEVICE_AND_API_INIT -> DEVICE_DT_DEFINE DEVICE_GET -> DEVICE_DT_GET DEVICE_DECLARE -> DEVICE_DT_INST_DECLARE etc.. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
c520385a39
commit
2f9573406d
12 changed files with 45 additions and 45 deletions
|
@ -602,8 +602,8 @@ do { \
|
|||
ADC_CONTEXT_INIT_LOCK(adc_sam_data_##n, ctx), \
|
||||
ADC_CONTEXT_INIT_SYNC(adc_sam_data_##n, ctx), \
|
||||
}; \
|
||||
DEVICE_AND_API_INIT(adc0_sam_##n, DT_INST_LABEL(n), \
|
||||
adc_sam0_init, &adc_sam_data_##n, \
|
||||
DEVICE_DT_INST_DEFINE(n, adc_sam0_init, device_pm_control_nop, \
|
||||
&adc_sam_data_##n, \
|
||||
&adc_sam_cfg_##n, POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&adc_sam0_api); \
|
||||
|
@ -612,7 +612,7 @@ do { \
|
|||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
DT_INST_IRQ(n, priority), \
|
||||
adc_sam0_isr, \
|
||||
DEVICE_GET(adc0_sam_##n), 0); \
|
||||
DEVICE_DT_INST_GET(n), 0); \
|
||||
irq_enable(DT_INST_IRQN(n)); \
|
||||
ADC_SAM0_CONFIGURE(n); \
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue