Commit cfd6693c authored by Romain Perier's avatar Romain Perier Committed by Mark Brown

spi: armada-3700: Replaced raw values for nbits by the SPI macros

Currently, function a3700_spi_pin_mode_set() configures the SPI transfer
mode according to the value passed as second argument. This value is
detected using the raw values from a switch case.

This commit replaces these raw values by the corresponding macro
constants in linux/spi/spi.h
Signed-off-by: default avatarRomain Perier <romain.perier@free-electrons.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0cc059ab
...@@ -170,12 +170,12 @@ static int a3700_spi_pin_mode_set(struct a3700_spi *a3700_spi, ...@@ -170,12 +170,12 @@ static int a3700_spi_pin_mode_set(struct a3700_spi *a3700_spi,
val &= ~(A3700_SPI_DATA_PIN0 | A3700_SPI_DATA_PIN1); val &= ~(A3700_SPI_DATA_PIN0 | A3700_SPI_DATA_PIN1);
switch (pin_mode) { switch (pin_mode) {
case 1: case SPI_NBITS_SINGLE:
break; break;
case 2: case SPI_NBITS_DUAL:
val |= A3700_SPI_DATA_PIN0; val |= A3700_SPI_DATA_PIN0;
break; break;
case 4: case SPI_NBITS_QUAD:
val |= A3700_SPI_DATA_PIN1; val |= A3700_SPI_DATA_PIN1;
break; break;
default: default:
......
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