secure_storage: swap select to depends on

Mixing `select` and `depends on` is a common source of Kconfig
dependency loops and should be avoided. Both `ZMS` and `SETTINGS` are
more commonly used with `depends on` rather than `select`.

The usage here also contradicts the Zephyr best practices guide for
`select`:
 * Avoid selecting symbols with prompts or dependencies.
   Prefer depends on.

Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit is contained in:
Jordan Yates 2025-02-22 21:48:57 +10:00 committed by Fabio Baltieri
parent 8f36307329
commit 5ad76de07f
2 changed files with 11 additions and 2 deletions

View File

@ -680,6 +680,15 @@ LoRa
additional ``user_data`` parameter, which is a void pointer. This parameter can be used to reference
any user-defined data structure. To maintain the current behavior, set this parameter to ``NULL``.
Secure Storage
==============
* Store backends no longer automatically enable their dependencies through ``select`` or ``imply``.
Users must ensure that the depencies are enabled in their applications.
:kconfig:option:`CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_SETTINGS` previously enabled NVS
and settings, which means the NVS settings backend would get used by default if ZMS wasn't
enabled. (:github:`86181`)
Stream Flash
============

View File

@ -14,7 +14,7 @@ config SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_ZMS
depends on FLASH_HAS_DRIVER_ENABLED \
&& $(dt_path_enabled,$(DT_ITS_PARTITION)) \
&& $(dt_node_has_compat,$(dt_node_parent,$(DT_ITS_PARTITION)),fixed-partitions)
select ZMS
depends on ZMS
help
This implementation of the ITS store module makes direct use of ZMS for storage.
It needs a `secure_storage_its_partition` devicetree chosen property that points
@ -31,7 +31,7 @@ config SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_SETTINGS
&& $(dt_node_has_compat,$(dt_node_parent,$(DT_SETTINGS_PARTITIION)),fixed-partitions))\
|| ($(dt_path_enabled,$(DT_STORAGE_PARTITION)) \
&& $(dt_node_has_compat,$(dt_node_parent,$(DT_STORAGE_PARTITION)),fixed-partitions)))
select SETTINGS
depends on SETTINGS
config SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_NONE
bool "No ITS store module implementation"