[riot-notifications] [RIOT-OS/RIOT] drivers/mtd: fix Kconfig dependencies (#16836)

Leandro Lanzieri notifications at github.com
Mon Sep 13 13:46:46 CEST 2021


@leandrolanzieri commented on this pull request.



> @@ -5,8 +5,8 @@
 # directory for more details.
 #
 
-config MODULE_MTD_NATIVE
+config HAVE_MTD_NATIVE

> > Sure, other than that does the re-strucure make sense?
> 
> I mean the dependency re-structuring done in this PR.

I think it makes sense in general, but we want board to define their default backend, so we need to add features indicating this for the rest of them (maybe for the ones depending on drivers having the driver is enough?).

Also, as now this enforces no interface for MTD via a dependency, we should catch this condition with some error symbol, that would stop compilation without an interface:

```
comment "Please select an interface for MTD"
    depends on MTD_NO_INTERFACE

config ERROR_MTD_NO_INTERFACE
    string
    default "An interface for MTD should be selected"
    depends on MTD_NO_INTERFACE

config MTD_NO_INTERFACE
    bool
    default y
    depends on !MODULE_MTD_SPI_NOR && !MODULE_MTD_FLASHPAGE && !MODULE_MTD_NATIVE
    depends on !MODULE_MTD_AT24CXXX && !MODULE_MTD_AT25XXX && !MODULE_MTD_MCI && !MODULE_MTD_SDCARD
    help
        Checks if a valid MTD interface has been set.
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16836#discussion_r707256835
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210913/1cf7f952/attachment-0001.htm>


More information about the notifications mailing list