• Luotao Fu's avatar
    mpc52xx_spi: add gpio chipselect · b8d4e2ce
    Luotao Fu authored
    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: default avatarLuotao Fu <l.fu@pengutronix.de>
    Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
    Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
    b8d4e2ce
mpc52xx_spi.c 14.7 KB