Patchwork [1/1] mxc spi: fix spi driver for 2.6.31

login
register
mail settings
Submitter Brad Figg
Date Oct. 13, 2009, 6:22 p.m.
Message ID <1255458173-7878-2-git-send-email-brad.figg@canonical.com>
Download mbox | patch
Permalink /patch/35897/
State Accepted
Headers show

Comments

Brad Figg - Oct. 13, 2009, 6:22 p.m.
From: Rob Herring <r.herring@freescale.com>

Signed-off-by: Brad Figg <brad.figg@canonical.com>
---
 drivers/spi/mxc_spi.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
Andy Whitcroft - Oct. 14, 2009, 7:39 a.m.
On Tue, Oct 13, 2009 at 11:22:53AM -0700, Brad Figg wrote:
> From: Rob Herring <r.herring@freescale.com>
> 
> Signed-off-by: Brad Figg <brad.figg@canonical.com>
> ---
>  drivers/spi/mxc_spi.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
> index 32e7640..0b622e9 100644
> --- a/drivers/spi/mxc_spi.c
> +++ b/drivers/spi/mxc_spi.c
> @@ -777,6 +777,11 @@ int mxc_spi_setup(struct spi_device *spi)
>  	return 0;
>  }
>  
> +static int mxc_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
> +{
> +	return 0;
> +}
> +
>  /*!
>   * This function is called when the data has to transfer from/to the
>   * current SPI device in poll mode
> @@ -963,6 +968,7 @@ static int mxc_spi_probe(struct platform_device *pdev)
>  
>  	master->bus_num = pdev->id + 1;
>  	master->num_chipselect = mxc_platform_info->maxchipselect;
> +	master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
>  #ifdef CONFIG_SPI_MXC_TEST_LOOPBACK
>  	master->num_chipselect += 1;
>  #endif
> @@ -1000,6 +1006,7 @@ static int mxc_spi_probe(struct platform_device *pdev)
>  	master_drv_data->mxc_bitbang.txrx_bufs = mxc_spi_transfer;
>  	master_drv_data->mxc_bitbang.master->setup = mxc_spi_setup;
>  	master_drv_data->mxc_bitbang.master->cleanup = mxc_spi_cleanup;
> +	master_drv_data->mxc_bitbang.setup_transfer = mxc_spi_setup_transfer;
>  
>  	/* Initialize the completion object */
>  

applied.

-apw

Patch

diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index 32e7640..0b622e9 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -777,6 +777,11 @@  int mxc_spi_setup(struct spi_device *spi)
 	return 0;
 }
 
+static int mxc_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
+{
+	return 0;
+}
+
 /*!
  * This function is called when the data has to transfer from/to the
  * current SPI device in poll mode
@@ -963,6 +968,7 @@  static int mxc_spi_probe(struct platform_device *pdev)
 
 	master->bus_num = pdev->id + 1;
 	master->num_chipselect = mxc_platform_info->maxchipselect;
+	master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
 #ifdef CONFIG_SPI_MXC_TEST_LOOPBACK
 	master->num_chipselect += 1;
 #endif
@@ -1000,6 +1006,7 @@  static int mxc_spi_probe(struct platform_device *pdev)
 	master_drv_data->mxc_bitbang.txrx_bufs = mxc_spi_transfer;
 	master_drv_data->mxc_bitbang.master->setup = mxc_spi_setup;
 	master_drv_data->mxc_bitbang.master->cleanup = mxc_spi_cleanup;
+	master_drv_data->mxc_bitbang.setup_transfer = mxc_spi_setup_transfer;
 
 	/* Initialize the completion object */