drivers: gpio: Convert drivers to new DT device macros
Convert gpio 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
4cfd2a1943
commit
569155701c
27 changed files with 136 additions and 116 deletions
|
@ -322,8 +322,8 @@ int gpio_sam_init(const struct device *dev)
|
|||
\
|
||||
static struct gpio_sam_runtime port_##n##_sam_runtime; \
|
||||
\
|
||||
DEVICE_AND_API_INIT(port_##n##_sam, DT_INST_LABEL(n), \
|
||||
gpio_sam_init, &port_##n##_sam_runtime, \
|
||||
DEVICE_DT_INST_DEFINE(n, gpio_sam_init, device_pm_control_nop, \
|
||||
&port_##n##_sam_runtime, \
|
||||
&port_##n##_sam_config, POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&gpio_sam_api); \
|
||||
|
@ -332,7 +332,7 @@ int gpio_sam_init(const struct device *dev)
|
|||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), DT_INST_IRQ(n, priority), \
|
||||
gpio_sam_isr, \
|
||||
DEVICE_GET(port_##n##_sam), 0); \
|
||||
DEVICE_DT_INST_GET(n), 0); \
|
||||
irq_enable(DT_INST_IRQN(n)); \
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue