Skip to content

Commit

Permalink
drivers: wdt_nrfx: Clean up driver instantiation
Browse files Browse the repository at this point in the history
- use CONFIG_HAS_HW_NRF_* symbols consistently in nRF multi-instance
  drivers when creating particular driver instances
- remove unnecessary hidden Kconfig options that indicated the type of
  peripheral to be used by a given instance (e.g. SPI, SPIM, or SPIS)
  and enabled proper nrfx driver instance; instead, use one option per
  peripheral type and include the corresponding shim driver flavor into
  compilation basing on that option (not the one that enables the nrfx
  driver as it was incorrectly done so far in some cases)

Signed-off-by: Andrzej Głąbek <[email protected]>
  • Loading branch information
anangl authored and carlescufi committed Jul 25, 2023
1 parent f89ca11 commit 4819634
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/watchdog/wdt_nrfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ static void wdt_event_handler(const struct device *dev, uint32_t requests)
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
&wdt_nrfx_driver_api)

#ifdef CONFIG_NRFX_WDT0
#ifdef CONFIG_HAS_HW_NRF_WDT0
WDT_NRFX_WDT_DEVICE(0);
#endif

#ifdef CONFIG_NRFX_WDT1
#ifdef CONFIG_HAS_HW_NRF_WDT1
WDT_NRFX_WDT_DEVICE(1);
#endif

0 comments on commit 4819634

Please sign in to comment.