From: Tony Lindgren Date: Mon, 2 Apr 2007 17:24:18 +0000 (-0400) Subject: Clean up drivers/spi to sync with mainline X-Git-Tag: v2.6.21-omap1~46 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ffaf960c7ae3e1433c05a9eb44017a77f7766723;p=linux-2.6-omap-h63xx.git Clean up drivers/spi to sync with mainline Clean up drivers/spi to sync with mainline Signed-off-by: Tony Lindgren --- diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 5b913c17068..7367e5f8058 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -136,13 +136,6 @@ config SPI_S3C24XX_GPIO GPIO lines to provide the SPI bus. This can be used where the inbuilt hardware cannot provide the transfer mode, or where the board is using non hardware connected pins. - -config SPI_OMAP24XX - bool "McSPI driver for OMAP24xx" - depends on SPI_MASTER && ARCH_OMAP24XX - help - SPI master controller for OMAP24xx McSPI modules. - # # Add new SPI master controllers in alphabetical order above this line # @@ -154,21 +147,6 @@ config SPI_OMAP24XX comment "SPI Protocol Masters" depends on SPI_MASTER -config TSC2101 - depends on SPI_MASTER - tristate "TSC2101 chip support" - ---help--- - Say Y here if you want support for the TSC2101 chip. - At the moment it provides basic register read / write interface - as well as a way to enable the MCLK clock. - -config TSC2102 - depends on SPI_MASTER - tristate "TSC2102 codec support" - ---help--- - Say Y here if you want support for the TSC2102 chip. It - will be needed for the touchscreen driver on some boards. - config SPI_AT25 tristate "SPI EEPROMs from most vendors" depends on SPI_MASTER && SYSFS @@ -180,6 +158,21 @@ config SPI_AT25 This driver can also be built as a module. If so, the module will be called at25. +config SPI_TSC2101 + depends on SPI_MASTER + tristate "TSC2101 chip support" + ---help--- + Say Y here if you want support for the TSC2101 chip. + At the moment it provides basic register read / write interface + as well as a way to enable the MCLK clock. + +config SPI_TSC2102 + depends on SPI_MASTER + tristate "TSC2102 codec support" + ---help--- + Say Y here if you want support for the TSC2102 chip. It + will be needed for the touchscreen driver on some boards. + config SPI_TSC2301 tristate "TSC2301 driver" depends on SPI_MASTER diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index 5bfdfeef846..c73c7765d37 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -21,17 +21,15 @@ obj-$(CONFIG_SPI_OMAP24XX) += omap2_mcspi.o obj-$(CONFIG_SPI_MPC83xx) += spi_mpc83xx.o obj-$(CONFIG_SPI_S3C24XX_GPIO) += spi_s3c24xx_gpio.o obj-$(CONFIG_SPI_S3C24XX) += spi_s3c24xx.o -obj-$(CONFIG_SPI_OMAP24XX) += omap2_mcspi.o -obj-$(CONFIG_SPI_OMAP_UWIRE) += omap_uwire.o # ... add above this line ... # SPI protocol drivers (device/link on bus) -obj-$(CONFIG_TSC2101) += tsc2101.o -obj-$(CONFIG_TSC2102) += tsc2102.o obj-$(CONFIG_SPI_AT25) += at25.o -obj-$(CONFIG_SPI_TSC2301) += tsc2301.o -tsc2301-objs := tsc2301-core.o -tsc2301-$(CONFIG_SPI_TSC2301_AUDIO) += tsc2301-mixer.o +obj-$(CONFIG_SPI_TSC2101) += tsc2101.o +obj-$(CONFIG_SPI_TSC2102) += tsc2102.o +obj-$(CONFIG_SPI_TSC2301) += tsc2301.o +tsc2301-objs := tsc2301-core.o +tsc2301-$(CONFIG_SPI_TSC2301_AUDIO) += tsc2301-mixer.o # ... add above this line ... # SPI slave controller drivers (upstream link) diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index e8dcacf1139..e558187e70a 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c @@ -604,7 +604,7 @@ static int omap2_mcspi_request_dma(struct spi_device *spi) printk(KERN_ERR "Unable to request DMA channel for McSPI RX\n"); return -EAGAIN; } - + if (omap_request_dma(tx_dev_id, "McSPI TX", omap2_mcspi_dma_tx_callback, spi, &mcspi_dma->dma_tx_channel)) { @@ -613,13 +613,13 @@ static int omap2_mcspi_request_dma(struct spi_device *spi) printk(KERN_ERR "Unable to request DMA channel for McSPI TX\n"); return -EAGAIN; } - + mcspi_dma->dma_rx_sync_dev = rx_dev_id; mcspi_dma->dma_tx_sync_dev = tx_dev_id; init_completion(&mcspi_dma->dma_rx_completion); init_completion(&mcspi_dma->dma_tx_completion); - + return 0; } @@ -639,7 +639,7 @@ static int omap2_mcspi_setup(struct spi_device *spi) return -ENOMEM; spi->controller_state = cs; } - + if (mcspi_dma->dma_rx_channel == -1 || mcspi_dma->dma_tx_channel == -1) { ret = omap2_mcspi_request_dma(spi); @@ -783,7 +783,7 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev) struct omap2_mcspi *mcspi; struct resource *r; int status = 0, i; - + if (!pdata) return -EINVAL; @@ -817,7 +817,7 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev) status = -ENODEV; goto err1; } - + mcspi->base = io_p2v(r->start); INIT_WORK(&mcspi->work, omap2_mcspi_work); @@ -840,11 +840,11 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev) } clk_enable(mcspi->fck); - mcspi->dma_channels = + mcspi->dma_channels = (struct omap2_mcspi_dma *)kzalloc(master->num_chipselect * sizeof(struct omap2_mcspi_dma), GFP_KERNEL); - + if (mcspi->dma_channels == NULL) goto err3;