diff --git a/sys/dev/iicbus/gpio/tca64xx.c b/sys/dev/iicbus/gpio/tca64xx.c --- a/sys/dev/iicbus/gpio/tca64xx.c +++ b/sys/dev/iicbus/gpio/tca64xx.c @@ -416,7 +416,7 @@ 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);