spi: dw: fix potential variable assignment error

spi::mode is defined by framework for several SPI capabilities,
such as polarity, phase, bit-endian, wire number. Directly use this
variable for setting controller's polarity and phase causes other
bit in register being set. Since SPI framework has its definition,
SPI_CPOL and SPI_CPHA offset may be changed by framwork change.
Instead of just mask off the relevant bits,
fetch required bit in spi::mode and set to register.

Signed-off-by: shaftarger <shol@livemail.tw>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
shaftarger 2018-12-28 16:33:12 +08:00 • committed by Mark Brown
commit e1bc204894
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0