drivers: cc2520: Correct configuration options

At the moment CC2520 configuration options are selected inside "TI
CC2520 Driver RAW channe" submenu like:

           [*] TI CC2520 Driver support  ----

           [ ] TI CC2520 Driver RAW channel  --->

Make RAW channel depends on TI CC2520.

Change-Id: I92879b7f4391f1842c012b6c03c78956e90b9441
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2017-03-21 11:11:53 +02:00 committed by Jukka Rissanen
parent 33c2480c09
commit 0d168bff77
7 changed files with 22 additions and 27 deletions

View file

@ -46,7 +46,7 @@ endif
config BLUETOOTH_MONITOR_ON_DEV_NAME
default UART_QMSI_1_NAME if BLUETOOTH_DEBUG_MONITOR
if IEEE802154_CC2520_LEGACY || IEEE802154_CC2520 || IEEE802154_CC2520_RAW
if IEEE802154_CC2520_LEGACY || IEEE802154_CC2520
config SPI
def_bool y
@ -85,6 +85,6 @@ config IEEE802154_CC2520_GPIO_1_NAME
default GPIO_QMSI_1_NAME
endif
endif # IEEE802154_CC2520_LEGACY || IEEE802154_CC2520 || IEEE802154_CC2520_RAW
endif # IEEE802154_CC2520_LEGACY || IEEE802154_CC2520
endif # BOARD_QUARK_SE_C1000_DEVBOARD

View file

@ -11,8 +11,7 @@
#include <init.h>
#if defined(CONFIG_IEEE802154_CC2520_LEGACY) || \
defined(CONFIG_IEEE802154_CC2520) || \
defined(CONFIG_IEEE802154_CC2520_RAW)
defined(CONFIG_IEEE802154_CC2520)
#include <ieee802154/cc2520.h>
#include <gpio.h>
@ -61,6 +60,4 @@ struct cc2520_gpio_configuration *cc2520_configure_gpios(void)
return cc2520_gpios;
}
#endif /* CONFIG_IEEE802154_CC2520_LEGACY || CONFIG_IEEE802154_CC2520 ||
* CONFIG_IEEE802154_CC2520_RAW
*/
#endif /* CONFIG_IEEE802154_CC2520_LEGACY || CONFIG_IEEE802154_CC2520 */

View file

@ -22,8 +22,7 @@
#define LED0_GPIO_PIN 25
#if defined(CONFIG_IEEE802154_CC2520_LEGACY) || \
defined(CONFIG_IEEE802154_CC2520) || \
defined(CONFIG_IEEE802154_CC2520_RAW)
defined(CONFIG_IEEE802154_CC2520)
/* GPIO numbers where the TI cc2520 chip is connected to */
#define CC2520_GPIO_VREG_EN 0 /* PIN ?, ATP_AON_INT0 (out) */
@ -33,9 +32,7 @@
#define CC2520_GPIO_CCA 6 /* PIN 6, GPIO6 (in) */
#define CC2520_GPIO_SFD 29 /* PIN 33, GPIO29 (in) */
#endif /* CONFIG_IEEE802154_CC2520_LEGACY || CONFIG_IEEE802154_CC2520 ||
* CONFIG_IEEE802154_CC2520_RAW
*/
#endif /* CONFIG_IEEE802154_CC2520_LEGACY || CONFIG_IEEE802154_CC2520 */
#if defined(CONFIG_USB)
/* GPIO driver name */

View file

@ -7,17 +7,7 @@ menuconfig IEEE802154_CC2520
select NET_L2_IEEE802154
default n
menuconfig IEEE802154_CC2520_RAW
bool "TI CC2520 Driver RAW channel"
select NET_L2_RAW_CHANNEL
default n
help
Enable IEEE802154_CC2520 driver with RAW channel
The CC2520 driver with RAW channel allows to export radio interface
over USB making an USB 802.15.4 dongle.
if IEEE802154_CC2520 || IEEE802154_CC2520_RAW
if IEEE802154_CC2520
config IEEE802154_CC2520_DRV_NAME
string "TI CC2520 Driver's name"
@ -99,6 +89,17 @@ config IEEE802154_CC2520_MAC7
range 0 ff
help
This is the byte 7 of the MAC address.
endif
endif
endif # ! IEEE802154_CC2520_RANDOM_MAC
config IEEE802154_CC2520_RAW
bool "TI CC2520 Driver RAW channel"
select NET_L2_RAW_CHANNEL
default n
help
Enable IEEE802154_CC2520 driver with RAW channel
The CC2520 driver with RAW channel allows to export radio interface
over USB making an USB 802.15.4 dongle.
endif # IEEE802154_CC2520

View file

@ -1,5 +1,4 @@
obj-$(CONFIG_IEEE802154_CC2520) += ieee802154_cc2520.o
obj-$(CONFIG_IEEE802154_CC2520_RAW) += ieee802154_cc2520.o
obj-$(CONFIG_IEEE802154_UPIPE) += ieee802154_uart_pipe.o
obj-$(CONFIG_IEEE802154_MCR20A) += ieee802154_mcr20a.o
obj-$(CONFIG_IEEE802154_MCR20A_RAW) += ieee802154_mcr20a.o

View file

@ -10,6 +10,7 @@ CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
CONFIG_IEEE802154_CC2520=y
CONFIG_IEEE802154_CC2520_RAW=y
CONFIG_NET_BUF=y
CONFIG_NETWORKING=y

View file

@ -15,7 +15,7 @@ CONFIG_NET_NBUF_DATA_SIZE=128
CONFIG_NET_L2_IEEE802154=y
#CONFIG_IEEE802154_CC2520=y
CONFIG_IEEE802154_CC2520=y
CONFIG_IEEE802154_CC2520_RAW=y
CONFIG_SYS_LOG=y