summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAnas Nashif <nashif@linux.intel.com>2017-01-14 13:11:34 +0000
committerAnas Nashif <nashif@linux.intel.com>2017-01-14 13:11:34 +0000
commit662a2d64761ae51d094344d48e1f193ded53ef82 (patch)
tree36ff7e143f1e6a0dc4ab4afb2226c1914dcb2484 /drivers
parent7ddec7b471ababd6c0ebabce40d6e8a2e0eec909 (diff)
parent85a22063a820ead9bf1f22225af927b6a3c8b2c9 (diff)
Merge "Merge net branch into master"
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ieee802154/Kconfig57
-rw-r--r--drivers/ieee802154/ieee802154_cc2520.c6
-rw-r--r--drivers/ieee802154/ieee802154_uart_pipe.c2
3 files changed, 23 insertions, 42 deletions
diff --git a/drivers/ieee802154/Kconfig b/drivers/ieee802154/Kconfig
index b82795e95..8e6c9ea3a 100644
--- a/drivers/ieee802154/Kconfig
+++ b/drivers/ieee802154/Kconfig
@@ -35,6 +35,25 @@
#
menu "IEEE 802.15.4 drivers options"
+config SYS_LOG_IEEE802154_DRIVER_LEVEL
+ int
+ prompt "IEEE802154 driver log level"
+ default 0
+ help
+ Sets log level for 802.15.4 drivers.
+
+ Levels are:
+
+ - 0 OFF, do not write
+
+ - 1 ERROR, only write SYS_LOG_ERR
+
+ - 2 WARNING, write SYS_LOG_WRN in adition to previous level
+
+ - 3 INFO, write SYS_LOG_INF in adition to previous levels
+
+ - 4 DEBUG, write SYS_LOG_DBG in adition to previous levels
+
config TI_CC2520
bool "TI CC2520 Driver support"
depends on NETWORKING
@@ -53,25 +72,6 @@ config TI_CC2520_RAW
if TI_CC2520 || TI_CC2520_RAW
-config SYS_LOG_TI_CC2520_LEVEL
- int
- prompt "CC2520 driver log level"
- default 0
- help
- Sets log level for 802.15.4 CC2520 driver.
-
- Levels are:
-
- - 0 OFF, do not write
-
- - 1 ERROR, only write SYS_LOG_ERR
-
- - 2 WARNING, write SYS_LOG_WRN in adition to previous level
-
- - 3 INFO, write SYS_LOG_INF in adition to previous levels
-
- - 4 DEBUG, write SYS_LOG_DBG in adition to previous levels
-
config TI_CC2520_DRV_NAME
string "TI CC2520 Driver's name"
default "cc2520"
@@ -139,23 +139,4 @@ config UPIPE_15_4_DRV_NAME
default "upipe_15_4"
depends on UPIPE_15_4
-config SYS_LOG_UPIPE_15_4_LEVEL
- int "UART PIPE driver log level"
- default 0
- depends on UPIPE_15_4
- help
- Sets log level for fake 802.15.4 UPIPE driver.
-
- Levels are:
-
- - 0 OFF, do not write
-
- - 1 ERROR, only write SYS_LOG_ERR
-
- - 2 WARNING, write SYS_LOG_WRN in adition to previous level
-
- - 3 INFO, write SYS_LOG_INF in adition to previous levels
-
- - 4 DEBUG, write SYS_LOG_DBG in adition to previous levels
-
endmenu
diff --git a/drivers/ieee802154/ieee802154_cc2520.c b/drivers/ieee802154/ieee802154_cc2520.c
index 02cb8e17a..14ff507b3 100644
--- a/drivers/ieee802154/ieee802154_cc2520.c
+++ b/drivers/ieee802154/ieee802154_cc2520.c
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-#define SYS_LOG_LEVEL CONFIG_SYS_LOG_TI_CC2520_LEVEL
+#define SYS_LOG_LEVEL CONFIG_SYS_LOG_IEEE802154_DRIVER_LEVEL
#define SYS_LOG_DOMAIN "dev/cc2520"
#include <logging/sys_log.h>
@@ -61,7 +61,7 @@
/*********
* DEBUG *
********/
-#if CONFIG_SYS_LOG_TI_CC2520_LEVEL == 4
+#if CONFIG_SYS_LOG_IEEE802154_DRIVER_LEVEL == 4
static inline void _cc2520_print_gpio_config(struct device *dev)
{
struct cc2520_context *cc2520 = dev->driver_data;
@@ -198,7 +198,7 @@ static inline void _cc2520_print_errors(struct cc2520_context *cc2520)
#define _cc2520_print_gpio_config(...)
#define _cc2520_print_exceptions(...)
#define _cc2520_print_errors(...)
-#endif /* CONFIG_SYS_LOG_TI_CC2520_LEVEL == 4 */
+#endif /* CONFIG_SYS_LOG_IEEE802154_DRIVER_LEVEL == 4 */
/*********************
diff --git a/drivers/ieee802154/ieee802154_uart_pipe.c b/drivers/ieee802154/ieee802154_uart_pipe.c
index 920640639..ae081903e 100644
--- a/drivers/ieee802154/ieee802154_uart_pipe.c
+++ b/drivers/ieee802154/ieee802154_uart_pipe.c
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#define SYS_LOG_LEVEL CONFIG_SYS_LOG_UPIPE_15_4_LEVEL
+#define SYS_LOG_LEVEL CONFIG_SYS_LOG_IEEE802154_DRIVER_LEVEL
#define SYS_LOG_DOMAIN "net/ieee802154/upipe/"
#include <logging/sys_log.h>