From 385c54648b39dade5addc73dcbabac88ecc83f9f Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Wed, 16 May 2012 16:02:55 +0400 Subject: i.MX SPI: Setup SPI chipselect to inactive state while initializing device To avoid unnecessary preset initial state chipselect lines for SPI, set it to inactive state when adding devices to the system. Signed-off-by: Alexander Shiyan Signed-off-by: Sascha Hauer --- drivers/spi/imx_spi.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/spi/imx_spi.c') diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c index 3b33b669fb..42358f2e6a 100644 --- a/drivers/spi/imx_spi.c +++ b/drivers/spi/imx_spi.c @@ -145,6 +145,10 @@ struct spi_imx_devtype_data { static int imx_spi_setup(struct spi_device *spi) { + struct imx_spi *imx = container_of(spi->master, struct imx_spi, master); + + imx->chipselect(spi, 0); + debug("%s mode 0x%08x bits_per_word: %d speed: %d\n", __FUNCTION__, spi->mode, spi->bits_per_word, spi->max_speed_hz); -- cgit v1.2.3