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
This commit is contained in:
Jakub Kołodziej 2022-11-08 13:02:54 +01:00 committed by Kornel Dulęba
parent 1edc3b6e56
commit f1717ffd7a

View File

@ -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);