drivers: watchdog: Convert drivers to new DT device macros
Convert watchdog 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
f105455ebe
commit
e376b9417b
13 changed files with 41 additions and 37 deletions
|
@ -225,7 +225,7 @@ static const struct wdt_driver_api wdt_api = {
|
|||
};
|
||||
|
||||
#define ESP32_WDT_INIT(idx) \
|
||||
DEVICE_DECLARE(wdt_esp32_##idx); \
|
||||
DEVICE_DT_INST_DECLARE(idx); \
|
||||
static void wdt_esp32_connect_irq_func##idx(void) \
|
||||
{ \
|
||||
esp32_rom_intr_matrix_set(0, ETS_TG##idx##_WDT_LEVEL_INTR_SOURCE, \
|
||||
|
@ -233,7 +233,7 @@ static const struct wdt_driver_api wdt_api = {
|
|||
IRQ_CONNECT(CONFIG_WDT##idx##_ESP32_IRQ, \
|
||||
4, \
|
||||
wdt_esp32_isr, \
|
||||
DEVICE_GET(wdt_esp32_##idx), \
|
||||
DEVICE_DT_INST_GET(idx), \
|
||||
0); \
|
||||
} \
|
||||
\
|
||||
|
@ -251,8 +251,9 @@ static const struct wdt_driver_api wdt_api = {
|
|||
.connect_irq = wdt_esp32_connect_irq_func##idx \
|
||||
}; \
|
||||
\
|
||||
DEVICE_AND_API_INIT(wdt_esp32_##idx, DT_INST_LABEL(idx), \
|
||||
DEVICE_DT_INST_DEFINE(idx, \
|
||||
wdt_esp32_init, \
|
||||
device_pm_control_nop, \
|
||||
&wdt##idx##_data, \
|
||||
&wdt_esp32_config##idx, \
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue