Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: mt7621: add BGPIOF_NO_SET_ON_INPUT flag

DSET/DCLR registers only works on output pins. Add corresponding
BGPIOF_NO_SET_ON_INPUT flag to bgpio_init call to fix direction_out
behavior.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Tested-by: René van Dorst <opensource@vdorst.com>
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

authored by

Chuanhong Guo and committed by
Bartosz Golaszewski
427cabed d19d2de6

+2 -2
+2 -2
drivers/gpio/gpio-mt7621.c
··· 227 227 ctrl = mtk->base + GPIO_REG_DCLR + (rg->bank * GPIO_BANK_STRIDE); 228 228 diro = mtk->base + GPIO_REG_CTRL + (rg->bank * GPIO_BANK_STRIDE); 229 229 230 - ret = bgpio_init(&rg->chip, dev, 4, 231 - dat, set, ctrl, diro, NULL, 0); 230 + ret = bgpio_init(&rg->chip, dev, 4, dat, set, ctrl, diro, NULL, 231 + BGPIOF_NO_SET_ON_INPUT); 232 232 if (ret) { 233 233 dev_err(dev, "bgpio_init() failed\n"); 234 234 return ret;