]> git.baikalelectronics.ru Git - kernel.git/commit
spi: rockchip: configure CTRLR1 according to size and data frame
authorHuibin Hong <huibin.hong@rock-chips.com>
Wed, 16 Aug 2017 02:12:02 +0000 (10:12 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 16 Aug 2017 10:58:23 +0000 (11:58 +0100)
commite17f27f1788965fd25b22a1597c58e05765d64fa
tree2b8f72c4b5afcc32c9a29b6adb47c31b8dbe4f7a
parentedee7667ef43097221706c3f59550391fd567d6b
spi: rockchip: configure CTRLR1 according to size and data frame

CTRLR1 is number of data frames, when rx only.
When data frame is 8 bit, CTRLR1 is len-1.
When data frame is 16 bit, CTRLR1 is (len/2)-1.

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-rockchip.c