Skip to content

Commit 3e51a6e

Browse files
drivers: spi: nrfx spim: implement device deinit
Implement device deinit fn for nrf spim device driver. Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
1 parent 7fbb1af commit 3e51a6e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/spi/spi_nrfx_spim.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,12 @@ static int spi_nrfx_init(const struct device *dev)
748748
#endif
749749
return pm_device_driver_init(dev, spim_nrfx_pm_action);
750750
}
751+
752+
static int spi_nrfx_deinit(const struct device *dev)
753+
{
754+
return 0;
755+
}
756+
751757
/*
752758
* We use NODELABEL here because the nrfx API requires us to call
753759
* functions which are named according to SoC peripheral instance
@@ -851,8 +857,9 @@ static int spi_nrfx_init(const struct device *dev)
851857
!(DT_GPIO_FLAGS(SPIM(idx), wake_gpios) & GPIO_ACTIVE_LOW),\
852858
"WAKE line must be configured as active high"); \
853859
PM_DEVICE_DT_DEFINE(SPIM(idx), spim_nrfx_pm_action); \
854-
SPI_DEVICE_DT_DEFINE(SPIM(idx), \
860+
SPI_DEVICE_DT_DEINIT_DEFINE(SPIM(idx), \
855861
spi_nrfx_init, \
862+
spi_nrfx_deinit, \
856863
PM_DEVICE_DT_GET(SPIM(idx)), \
857864
&spi_##idx##_data, \
858865
&spi_##idx##z_config, \

0 commit comments

Comments
 (0)