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)
committerMark Brown <broonie@linaro.org>
Fri, 18 Apr 2014 17:24:38 +0000 (18:24 +0100)
commit83596fbeb5d28e8cb8878786133945d4dc7c0090
treeb2ae5e910185145763a5a8a2a47628551147aba8
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5
spi: core: Ignore unsupported Dual/Quad Transfer Mode bits

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>
Cc: stable@vger.kernel.org
drivers/spi/spi.c