From f1717ffd7a085378dd42f8f1bce7d62be93625a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ko=C5=82odziej?= Date: Tue, 8 Nov 2022 13:02:54 +0100 Subject: [PATCH] gpio: Fix typo causing GPIO configuration mismatch Polarity inversion register was mistekanly filled with the value of the direction configuration register. Correct that. Reviewed by: kd Obtained from: Semihalf Differential Revision: https://reviews.freebsd.org/D37262 --- sys/dev/iicbus/gpio/tca64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iicbus/gpio/tca64xx.c b/sys/dev/iicbus/gpio/tca64xx.c index 62cfd9d8fd59..fe21e443c7d6 100644 --- a/sys/dev/iicbus/gpio/tca64xx.c +++ b/sys/dev/iicbus/gpio/tca64xx.c @@ -416,7 +416,7 @@ tca64xx_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) goto fail; addr = TCA64XX_REG_ADDR(pin, sc->polarity_inv_reg); - error = tca64xx_write(dev, addr, val); + error = tca64xx_write(dev, addr, inv_val); fail: mtx_unlock(&sc->mtx);