Skip to content

Commit 7f4c083

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 9e74cb8 commit 7f4c083

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
@@ -759,6 +759,12 @@ static int spi_nrfx_init(const struct device *dev)
759759
#endif
760760
return pm_device_driver_init(dev, spim_nrfx_pm_action);
761761
}
762+
763+
static int spi_nrfx_deinit(const struct device *dev)
764+
{
765+
return 0;
766+
}
767+
762768
/*
763769
* We use NODELABEL here because the nrfx API requires us to call
764770
* functions which are named according to SoC peripheral instance
@@ -862,8 +868,9 @@ static int spi_nrfx_init(const struct device *dev)
862868
!(DT_GPIO_FLAGS(SPIM(idx), wake_gpios) & GPIO_ACTIVE_LOW),\
863869
"WAKE line must be configured as active high"); \
864870
PM_DEVICE_DT_DEFINE(SPIM(idx), spim_nrfx_pm_action); \
865-
SPI_DEVICE_DT_DEFINE(SPIM(idx), \
871+
SPI_DEVICE_DT_DEINIT_DEFINE(SPIM(idx), \
866872
spi_nrfx_init, \
873+
spi_nrfx_deinit, \
867874
PM_DEVICE_DT_GET(SPIM(idx)), \
868875
&spi_##idx##_data, \
869876
&spi_##idx##z_config, \

0 commit comments

Comments
 (0)