Commit 038b9de4 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown

spi: uniphier: Use SPI_MODE_X_MASK

Use SPI_MODE_X_MASK instead of open coded variant.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210510131217.49357-7-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4ccf0557
...@@ -142,7 +142,7 @@ static void uniphier_spi_set_mode(struct spi_device *spi) ...@@ -142,7 +142,7 @@ static void uniphier_spi_set_mode(struct spi_device *spi)
* FSTRT start frame timing * FSTRT start frame timing
* 0: rising edge of clock, 1: falling edge of clock * 0: rising edge of clock, 1: falling edge of clock
*/ */
switch (spi->mode & (SPI_CPOL | SPI_CPHA)) { switch (spi->mode & SPI_MODE_X_MASK) {
case SPI_MODE_0: case SPI_MODE_0:
/* CKPHS=1, CKINIT=0, CKDLY=1, FSTRT=0 */ /* CKPHS=1, CKINIT=0, CKDLY=1, FSTRT=0 */
val1 = SSI_CKS_CKPHS | SSI_CKS_CKDLY; val1 = SSI_CKS_CKPHS | SSI_CKS_CKDLY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment