mpc52xx_spi: add gpio chipselect
authorLuotao Fu <l.fu@pengutronix.de>
Fri, 13 Nov 2009 09:41:17 +0000 (10:41 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 9 Dec 2009 01:48:13 +0000 (18:48 -0700)
commitb8d4e2ce60b63294e3408d1c5211b8a8dc4af095
tree39fc865075d3828f0891434b482948245738021e
parentd65aea99bd9e1d2e9560c5fff6c512d93c4a78d5
mpc52xx_spi: add gpio chipselect

This one enables the mpc52xx_spi driver for usage of user defined gpio lines
as chipselect. This way we can control some more spi devices than only one

V2 Changes:
* preinitialize the gpio as output in probe function and call gpio_set_value in
  the chip select function instead of calling direction_output every time.
* initialize the gpio line with output high, since we don't support CS_HIGH
  in the driver currently any way. change gpio value setting to default active
  low in chip select call.
* free the gpio array while error or removing.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/mpc52xx_spi.c