]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: grgpio: Do not use gc->pin2mask()
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 20 Oct 2017 12:57:37 +0000 (14:57 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 25 Oct 2017 09:25:38 +0000 (11:25 +0200)
commit53f8d326c5dc3f6208737d171b14161b0d3c4b76
tree877809c15b39bb8c2b33f94e8219f2d6b656a1f3
parent4826de4ed4178e2e12d50c9ff6e2deada83fe842
gpio: grgpio: Do not use gc->pin2mask()

The pin2mask() accessor only shuffles BIT ORDER in big endian systems,
i.e. the bitstuffing is swizzled big endian so "bit 0" is bit 7 or
bit 15 or bit 31 or so.

The grgpio only uses big endian BYTE ORDER which will be taken car of
by the ->write_reg() callback.

Just use BIT(offset) to assign the bit.

Acked-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-grgpio.c