summaryrefslogtreecommitdiff
path: root/include/linux/gpio
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2017-10-20 17:08:12 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-10-25 12:25:40 +0300
commitb3222f7147e028d31f965f193b6f995147c64651 (patch)
tree7f75b5c93892bc59543fed5adcc53e38da6fc502 /include/linux/gpio
parentd74423687f9d70417bfec68121cbd35f79bb170f (diff)
downloadlinux-b3222f7147e028d31f965f193b6f995147c64651.tar.xz
gpio: mpc8xxx: Do not reverse bits using bgpio
The MPC8xxx driver is always instantiating its generic GPIO functions with the flag BGPIOF_BIG_ENDIAN. This means "big-endian bit order" and means the bits representing the GPIO lines in the registers are reversed around 31 bits so line 0 is at bit 31 and so forth down to line 31 in bit 0. Instead of looping into the generic MMIO gpio to do the simple calculation of a bitmask, through a vtable call with two parameters likely using stack frames etc (unless the compiler optimize it) and obscuring the view for the programmer, let's just open-code what the call does. This likely executes faster, saves space and makes the code easier to read. Cc: Liu Gang <Gang.Liu@nxp.com> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
0 files changed, 0 insertions, 0 deletions