]> 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)
commit55c6b38a7f44f94c70fed0451e8ce50ed6681ff6
tree877809c15b39bb8c2b33f94e8219f2d6b656a1f3
parent4a07e7e36aebefb74af3b80ea08b96e2538f5f95
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