From 58b79b134addfc04c3a42db84de2ebb0a722d981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20G=C5=82=C4=85bek?= Date: Fri, 4 Mar 2022 12:10:06 +0100 Subject: [PATCH] drivers: gpio_pcal6408a: Fix handling of the GPIO_INT_DEBOUNCE flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ignore the flag instead of rejecting it with -ENOTSUP, as this is what the GPIO API expects from drivers that do not support debouncing. Signed-off-by: Andrzej Głąbek --- drivers/gpio/gpio_pcal6408a.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio_pcal6408a.c b/drivers/gpio/gpio_pcal6408a.c index 7bbb0ef6d0550..9c0eac3b905b0 100644 --- a/drivers/gpio/gpio_pcal6408a.c +++ b/drivers/gpio/gpio_pcal6408a.c @@ -124,11 +124,9 @@ static int pcal6408a_pin_configure(const struct device *dev, int rc; /* This device does not support open-source outputs, and open-drain - * outputs can be only configured port-wise. It also does not support - * debouncing. + * outputs can be only configured port-wise. */ - if ((flags & GPIO_SINGLE_ENDED) != 0 || - (flags & GPIO_INT_DEBOUNCE) != 0) { + if ((flags & GPIO_SINGLE_ENDED) != 0) { return -ENOTSUP; }