From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Larsson Subject: [PATCH v3 2/7] spi: spi-fsl-spi: Make sure in spi_fsl_setup that chipselect becomes inactive Date: Fri, 15 Feb 2013 16:52:22 +0100 Message-ID: <1360943547-2186-3-git-send-email-andreas@gaisler.com> References: <1360943547-2186-1-git-send-email-andreas@gaisler.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Joakim Tjernlund , software-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org, Mark Brown , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Anton Vorontsov , Peter Korsgaard , spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Mingkai Hu To: Grant Likely Return-path: In-Reply-To: <1360943547-2186-1-git-send-email-andreas-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org This is needed for a device in SPI_CS_HIGH mode that otherwise could start out active for the first transaction. Acked-by: Anton Vorontsov Signed-off-by: Andreas Larsson --- drivers/spi/spi-fsl-spi.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c index cf1cffb..527ac35 100644 --- a/drivers/spi/spi-fsl-spi.c +++ b/drivers/spi/spi-fsl-spi.c @@ -387,6 +387,10 @@ static int fsl_spi_setup(struct spi_device *spi) cs->hw_mode = hw_mode; /* Restore settings */ return retval; } + + /* Initialize chipselect - might be active for SPI_CS_HIGH mode */ + fsl_spi_chipselect(spi, BITBANG_CS_INACTIVE); + return 0; } -- 1.7.0.4 ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb