Skip to content
Unverified Commit e1bc2048 authored by shaftarger's avatar shaftarger Committed by Mark Brown
Browse files

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: default avatarshaftarger <shol@livemail.tw>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0dcdcd0e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment