drivers: crypto_nrf_ecb: Convert to use devicetree

Convert the driver so that it creates its instance basing on DT.
Remove no longer needed Kconfig option CRYPTO_NRF_ECB_NAME.
Also update accordingly the crypto sample.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
Andrzej Głąbek 2020-12-21 13:09:05 +01:00 committed by Ioannis Glaropoulos
commit d855d47288
3 changed files with 15 additions and 14 deletions

View file

@ -3,16 +3,15 @@
# Copyright (c) 2020 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
# Workaround for not being able to have commas in macro arguments
DT_COMPAT_NORDIC_NRF_ECB := nordic,nrf-ecb
menuconfig CRYPTO_NRF_ECB
config CRYPTO_NRF_ECB
bool "nRF AES electronic codebook mode encryption"
depends on HAS_HW_NRF_ECB && !BT_CTLR
depends on $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_ECB))
# Bluetooth controller uses the ECB peripheral directly
# (see subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/ecb.c),
# hence this driver cannot be enabled together with it.
depends on !BT_CTLR
help
Enable nRF HAL-based AES ECB encryption driver
config CRYPTO_NRF_ECB_DRV_NAME
string "nRF AES ECB driver name"
default "CRYPTO_NRF_ECB"
depends on CRYPTO_NRF_ECB
help
Driver name for nRF AES ECB