From 70bdbfa1de862777b37b331ccfb43694b6c7048c Mon Sep 17 00:00:00 2001 From: Vudang Thaihai Date: Wed, 6 Dec 2023 14:44:39 +0000 Subject: [PATCH] drivers: gpio: gpio_pca953x: Adding input latch and interrupt mask Resolved git error Signed-off-by: Vudang Thaihai --- drivers/gpio/gpio_pca953x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio_pca953x.c b/drivers/gpio/gpio_pca953x.c index b31d61d49c0b368..d097437f2381db4 100644 --- a/drivers/gpio/gpio_pca953x.c +++ b/drivers/gpio/gpio_pca953x.c @@ -445,10 +445,10 @@ static int gpio_pca953x_init(const struct device *dev) &drv_data->gpio_cb); /* This may not present on all variants of device */ - if (cfg->input_latch != NULL) { + if (cfg->input_latch) { i2c_reg_write_byte_dt(&cfg->i2c, REG_INPUT_LATCH_PORT0, cfg->input_latch); } - if (cfg->input_latch != NULL) { + if (cfg->interrupt_mask) { i2c_reg_write_byte_dt(&cfg->i2c, REG_INT_MASK_PORT0, cfg->interrupt_mask); } }