From 2ebd80cd0e31c1029a76c693308fe6388e4b6672 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Thu, 9 Jul 2020 22:04:49 +0100 Subject: [PATCH] drivers: lora: sx126x: Don't initialize control pin to active The antenna control GPIO was incorrectly initialized to active. This is unnecessary since the HAL will activate the antenna switch when the chip enters an active state. Signed-off-by: Andreas Sandberg --- drivers/lora/sx126x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lora/sx126x.c b/drivers/lora/sx126x.c index a48f71a2e75..a2276856784 100644 --- a/drivers/lora/sx126x.c +++ b/drivers/lora/sx126x.c @@ -430,7 +430,7 @@ static int sx126x_lora_init(struct device *dev) } gpio_pin_configure(dev_data.antenna_enable, GPIO_ANTENNA_ENABLE_PIN, - GPIO_OUTPUT_ACTIVE | GPIO_ANTENNA_ENABLE_FLAGS); + GPIO_OUTPUT_INACTIVE | GPIO_ANTENNA_ENABLE_FLAGS); #endif dev_data.spi = device_get_binding(DT_INST_BUS_LABEL(0));