From 8538b835f37983a41ef00d40c1a98d16004ba2a0 Mon Sep 17 00:00:00 2001 From: Alexandre Bourdiol Date: Mon, 7 Mar 2022 15:26:02 +0100 Subject: [PATCH] drivers: bluetooth: hci: use logic (and not pin value) kick/release CS Use logic (and not pin value) for kick_cs() and release_cs() because potential pin value invertion (Active LOW) is handled in gpio_pin_set() Signed-off-by: Alexandre Bourdiol --- drivers/bluetooth/hci/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/hci/spi.c b/drivers/bluetooth/hci/spi.c index 9bd42ec998c..4cb8ff0c35f 100644 --- a/drivers/bluetooth/hci/spi.c +++ b/drivers/bluetooth/hci/spi.c @@ -190,13 +190,13 @@ static int configure_cs(void) static void kick_cs(void) { - gpio_pin_set_dt(&bus.config.cs->gpio, 1); gpio_pin_set_dt(&bus.config.cs->gpio, 0); + gpio_pin_set_dt(&bus.config.cs->gpio, 1); } static void release_cs(void) { - gpio_pin_set_dt(&bus.config.cs->gpio, 1); + gpio_pin_set_dt(&bus.config.cs->gpio, 0); } static bool irq_pin_high(void)