lora: compile drivers based on devicetree

Similar to the changes made in #48048, compile in the appropriate lora
modem driver when `CONFIG_LORA=y`. The `LORA_SX12XX` symbol has no
use now so remove. LoRa and LoRaWAN subsystems are still marked as
unstable so no additional deprecation cycle is needed.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
Jordan Yates 2023-03-18 18:34:43 +10:00 committed by Carles Cufí
parent 33bf1fa0c6
commit 41d83d7ea2
5 changed files with 9 additions and 31 deletions

View file

@ -4,49 +4,30 @@
# SPDX-License-Identifier: Apache-2.0
#
menuconfig LORA_SX12XX
bool "Semtech SX-series driver"
select HAS_SEMTECH_RADIO_DRIVERS
depends on SPI
help
Enable LoRa driver for Semtech SX12xx.
if LORA_SX12XX
choice
prompt "LoRa Radio chipset"
default LORA_SX127X if DT_HAS_SEMTECH_SX1272_ENABLED
default LORA_SX127X if DT_HAS_SEMTECH_SX1276_ENABLED
default LORA_SX126X if DT_HAS_SEMTECH_SX1261_ENABLED
default LORA_SX126X if DT_HAS_SEMTECH_SX1262_ENABLED
default LORA_STM32WL_SUBGHZ_RADIO if DT_HAS_ST_STM32WL_SUBGHZ_RADIO_ENABLED
help
Select the LoRa modem used on your board. The default value
is discovered from the device tree and should be correct for
most users.
config LORA_SX127X
bool "Semtech SX127x driver"
default y
depends on DT_HAS_SEMTECH_SX1272_ENABLED || DT_HAS_SEMTECH_SX1276_ENABLED
select HAS_SEMTECH_SX1272 if DT_HAS_SEMTECH_SX1272_ENABLED
select HAS_SEMTECH_SX1276 if DT_HAS_SEMTECH_SX1276_ENABLED
depends on SPI
help
Enable LoRa driver for Semtech SX1272 and SX1276.
config LORA_SX126X
bool "Semtech SX126x driver"
default y
depends on DT_HAS_SEMTECH_SX1261_ENABLED || DT_HAS_SEMTECH_SX1262_ENABLED
select HAS_SEMTECH_SX126X
depends on SPI
help
Enable LoRa driver for Semtech SX1261 and SX1262.
config LORA_STM32WL_SUBGHZ_RADIO
bool "STM32WL SUBGHZ radio driver"
default y
depends on DT_HAS_ST_STM32WL_SUBGHZ_RADIO_ENABLED
select HAS_SEMTECH_SX126X
depends on SPI
help
Enable LoRa driver for STM32WL SUBGHZ radio.
endchoice
endif

View file

@ -14,15 +14,15 @@ config HAS_SEMTECH_RADIO_DRIVERS
config HAS_SEMTECH_SX1272
bool
depends on HAS_SEMTECH_RADIO_DRIVERS
select HAS_SEMTECH_RADIO_DRIVERS
config HAS_SEMTECH_SX1276
bool
depends on HAS_SEMTECH_RADIO_DRIVERS
select HAS_SEMTECH_RADIO_DRIVERS
config HAS_SEMTECH_SX126X
bool
depends on HAS_SEMTECH_RADIO_DRIVERS
select HAS_SEMTECH_RADIO_DRIVERS
config HAS_SEMTECH_LORAMAC
bool "Semtech LoRaMac Stack"

View file

@ -2,5 +2,4 @@ CONFIG_LOG=y
CONFIG_SPI=y
CONFIG_GPIO=y
CONFIG_LORA=y
CONFIG_LORA_SX12XX=y
CONFIG_PRINTK=y

View file

@ -2,5 +2,4 @@ CONFIG_LOG=y
CONFIG_SPI=y
CONFIG_GPIO=y
CONFIG_LORA=y
CONFIG_LORA_SX12XX=y
CONFIG_PRINTK=y

View file

@ -2,7 +2,6 @@ CONFIG_LOG=y
CONFIG_SPI=y
CONFIG_GPIO=y
CONFIG_LORA=y
CONFIG_LORA_SX12XX=y
CONFIG_LORAWAN=y
CONFIG_LORAMAC_REGION_IN865=y
CONFIG_MAIN_STACK_SIZE=2048