From d03844ef8066f1f98e4a07bb6629f8e950c387dd Mon Sep 17 00:00:00 2001
From: Kaspar Schleiser <kaspar@schleiser.de>
Date: Sat, 28 Oct 2017 21:09:36 +0200
Subject: [PATCH] make: add missing feature dependencies to Makefile.dep

---
 Makefile.dep         |  5 +++++
 drivers/Makefile.dep | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/Makefile.dep b/Makefile.dep
index 59a25739bf..1da61c9093 100644
--- a/Makefile.dep
+++ b/Makefile.dep
@@ -418,6 +418,7 @@ endif
 
 ifneq (,$(filter uart_stdio,$(USEMODULE)))
   USEMODULE += isrpipe
+  FEATURES_REQUIRED += periph_uart
 endif
 
 ifneq (,$(filter isrpipe,$(USEMODULE)))
@@ -506,6 +507,10 @@ ifneq (,$(filter libfixmath-unittests,$(USEMODULE)))
   USEMODULE += libfixmath
 endif
 
+ifneq (,$(filter luid,$(USEMODULE)))
+  FEATURES_OPTIONAL += periph_cpuid
+endif
+
 ifneq (,$(filter fib,$(USEMODULE)))
   USEMODULE += universal_address
   USEMODULE += xtimer
diff --git a/drivers/Makefile.dep b/drivers/Makefile.dep
index 4c7eea3021..923c902e8c 100644
--- a/drivers/Makefile.dep
+++ b/drivers/Makefile.dep
@@ -20,6 +20,8 @@ ifneq (,$(filter at86rf2%,$(USEMODULE)))
   USEMODULE += netif
   USEMODULE += ieee802154
   USEMODULE += netdev_ieee802154
+  FEATURES_REQUIRED += periph_gpio
+  FEATURES_REQUIRED += periph_spi
 endif
 
 ifneq (,$(filter mrf24j40,$(USEMODULE)))
@@ -53,6 +55,7 @@ ifneq (,$(filter cc110x,$(USEMODULE)))
   ifneq (,$(filter gnrc_netdev_default,$(USEMODULE)))
     USEMODULE += gnrc_cc110x
   endif
+  FEATURES_REQUIRED += periph_spi
 endif
 
 ifneq (,$(filter cc2420,$(USEMODULE)))
@@ -99,6 +102,7 @@ endif
 
 ifneq (,$(filter hdc1000,$(USEMODULE)))
   USEMODULE += xtimer
+  FEATURES_REQUIRED += periph_i2c
 endif
 
 ifneq (,$(filter hih6130,$(USEMODULE)))
@@ -119,6 +123,7 @@ ifneq (,$(filter kw2xrf,$(USEMODULE)))
   USEMODULE += netif
   USEMODULE += ieee802154
   USEMODULE += netdev_ieee802154
+  FEATURES_REQUIRED += periph_spi
 endif
 
 ifneq (,$(filter hd44780,$(USEMODULE)))
@@ -126,6 +131,10 @@ ifneq (,$(filter hd44780,$(USEMODULE)))
   USEMODULE += xtimer
 endif
 
+ifneq (,$(filter l3g4200d,$(USEMODULE)))
+  FEATURES_REQUIRED += periph_i2c
+endif
+
 ifneq (,$(filter lis3dh,$(USEMODULE)))
   FEATURES_REQUIRED += periph_gpio
   FEATURES_REQUIRED += periph_spi
@@ -140,6 +149,22 @@ ifneq (,$(filter lpd8808,$(USEMODULE)))
   FEATURES_REQUIRED += periph_gpio
 endif
 
+ifneq (,$(filter mag3110,$(USEMODULE)))
+  FEATURES_REQUIRED += periph_i2c
+endif
+
+ifneq (,$(filter mma8x5x,$(USEMODULE)))
+  FEATURES_REQUIRED += periph_i2c
+endif
+
+ifneq (,$(filter my9221,$(USEMODULE)))
+  FEATURES_REQUIRED += periph_gpio
+endif
+
+ifneq (,$(filter mpl3115a2,$(USEMODULE)))
+  FEATURES_REQUIRED += periph_i2c
+endif
+
 ifneq (,$(filter mpu9150,$(USEMODULE)))
   USEMODULE += xtimer
 endif
@@ -207,6 +232,14 @@ ifneq (,$(filter sx127%,$(USEMODULE)))
   USEMODULE += sx127x
 endif
 
+ifneq (,$(filter tcs37727,$(USEMODULE)))
+  FEATURES_REQUIRED += periph_i2c
+endif
+
+ifneq (,$(filter tmp006,$(USEMODULE)))
+  FEATURES_REQUIRED += periph_i2c
+endif
+
 ifneq (,$(filter veml6070,$(USEMODULE)))
   FEATURES_REQUIRED += periph_i2c
 endif
-- 
GitLab