From 559cf0210703edb8df9a0cf88305dea03f4dabed Mon Sep 17 00:00:00 2001 From: Marcin Niestroj Date: Thu, 2 Jul 2020 19:41:57 +0200 Subject: [PATCH] drivers: lora: sx1276: configure reset gpio only once Reset gpio is configured during driver initialization. There is no reason to do it repeat that process later, so replace gpio_pin_configure() with gpio_pin_set(). Signed-off-by: Marcin Niestroj --- drivers/lora/sx1276.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/lora/sx1276.c b/drivers/lora/sx1276.c index 23b7ba46727..98a4251950a 100644 --- a/drivers/lora/sx1276.c +++ b/drivers/lora/sx1276.c @@ -21,7 +21,6 @@ LOG_MODULE_REGISTER(sx1276); #define GPIO_RESET_PIN DT_INST_GPIO_PIN(0, reset_gpios) -#define GPIO_RESET_FLAGS DT_INST_GPIO_FLAGS(0, reset_gpios) #define GPIO_CS_PIN DT_INST_SPI_DEV_CS_GPIOS_PIN(0) #define GPIO_CS_FLAGS DT_INST_SPI_DEV_CS_GPIOS_FLAGS(0) @@ -234,8 +233,7 @@ void SX1276Reset(void) { SX1276SetBoardTcxo(true); - gpio_pin_configure(dev_data.reset, GPIO_RESET_PIN, - GPIO_OUTPUT_ACTIVE | GPIO_RESET_FLAGS); + gpio_pin_set(dev_data.reset, GPIO_RESET_PIN, 1); k_sleep(K_MSEC(1));