spi: sh-msiof: Use the core cs_gpio field, and make it optional
authorGeert Uytterhoeven <geert+renesas@linux-m68k.org>
Thu, 20 Feb 2014 14:43:04 +0000 (15:43 +0100)
committerSimon Horman <horms@verge.net.au>
Fri, 5 Dec 2014 00:21:47 +0000 (09:21 +0900)
commit0ab0a152a441a246877273d77ed337fa8215220f
tree2d73923865e863e7703373e1b39c3f83cb9edb02
parent0e6b385e356047cc6f2bc240cfb13d96ded1561f
spi: sh-msiof: Use the core cs_gpio field, and make it optional

In current implementation, CS is controlled by GPIO, which is passed
through spi->controller_data.  However, the MSIOF HW module has a function
to output CS by itself, which is already enabled and actual switch will be
done by pinmux.

Store the GPIO number in the core cs_gpio field, and ignore it if it is
an invalid (negative) GPIO number.

Loosely based on a patch from Takashi Yoshii <takasi-y@ops.dti.ne.jp>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 8d19534a8d539bb2e598e56e017a423f205e909e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/spi/spi-sh-msiof.c