spi: core: Ignore unsupported Dual/Quad Transfer Mode bits
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 14 Apr 2014 17:39:53 +0000 (19:39 +0200)
committerJiri Slaby <jslaby@suse.cz>
Mon, 9 Jun 2014 13:53:57 +0000 (15:53 +0200)
commit4ee1108042b15955583703494965934c36b16c32
tree7db4bfa16aab84e5aedafad07dd1efdfbd0344e6
parent20b96d740d84a465bf4c5fd2bff37a79f56bff56
spi: core: Ignore unsupported Dual/Quad Transfer Mode bits

commit 83596fbeb5d28e8cb8878786133945d4dc7c0090 upstream.

The availability of SPI Dual or Quad Transfer Mode as indicated by the
"spi-tx-bus-width" and "spi-rx-bus-width" properties in the device tree is
a hardware property of the SPI master, SPI slave, and board wiring.  Hence
the SPI core should not reject an SPI slave because an SPI master driver
doesn't (yet) support Dual or Quad Transfer Mode.

Change the lack of Dual or Quad Transfer Mode support in the SPI master
driver from an error condition to a warning condition, and ignore the
unsupported mode bits, falling back to Single Transfer Mode, to avoid
breakages when running old kernels with new device trees.

Fixes: f477b7fb13df (spi: DUAL and QUAD support)
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/spi/spi.c