Skip to content

Commit

Permalink
spi: core: Ignore unsupported spi-[tr]x-bus-width property values
Browse files Browse the repository at this point in the history
Rejecting unsupported values of spi-tx-bus-width and spi-rx-bus-width
may break compatibility with future DTs. Just ignore them, falling back
to Single SPI Transfers.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Geert Uytterhoeven authored and Mark Brown committed May 26, 2014
1 parent eee668a commit 80874d8
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1247,11 +1247,10 @@ static void of_register_spi_devices(struct spi_master *master)
spi->mode |= SPI_TX_QUAD;
break;
default:
dev_err(&master->dev,
"spi-tx-bus-width %d not supported\n",
value);
spi_dev_put(spi);
continue;
dev_warn(&master->dev,
"spi-tx-bus-width %d not supported\n",
value);
break;
}
}

Expand All @@ -1266,11 +1265,10 @@ static void of_register_spi_devices(struct spi_master *master)
spi->mode |= SPI_RX_QUAD;
break;
default:
dev_err(&master->dev,
"spi-rx-bus-width %d not supported\n",
value);
spi_dev_put(spi);
continue;
dev_warn(&master->dev,
"spi-rx-bus-width %d not supported\n",
value);
break;
}
}

Expand Down

0 comments on commit 80874d8

Please sign in to comment.