summaryrefslogtreecommitdiff
path: root/lib/find_bit.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2015-11-30 14:35:26 (GMT)
committerLinus Walleij <linus.walleij@linaro.org>2015-12-10 16:21:02 (GMT)
commit902e7e60086b925e27f68261feda4898c5be6966 (patch)
tree9f72561704eded826b597f4b6d467a4aa24041c0 /lib/find_bit.c
parent410f4574f43c8bd61cd413a15e26e8f03c608085 (diff)
downloadlinux-902e7e60086b925e27f68261feda4898c5be6966.tar.xz
gpio: 74x164: Use a single SPI transfer instead of multiple transfers
Currently the 74x164 driver assembles an SPI message from an array of one-byte SPI transfers, one for each daisy-chained shift register, as the first byte sent will end up in the last register. This array is allocated and deallocated on each GPIO write access. By storing the data in the internal buffer in reverse order, we can use a single SPI transfer with the internal buffer directly, simplifying the code a lot, and avoiding memory (de)allocations. This also avoids transient values on the GPIO outputs when using an SPI master that cannot keep the hardware chip select asserted in between multiple transfers (and would need cs-gpios for proper operation). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Mark Brown <broonie@kernel.org> [Rebased changing .dev to .parent] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'lib/find_bit.c')
0 files changed, 0 insertions, 0 deletions