aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/pxa2xx_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/pxa2xx_spi.c')
-rw-r--r--drivers/spi/pxa2xx_spi.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index c7365e0b22dd..9c311dc4771d 100644
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@ -1185,9 +1185,6 @@ static int transfer(struct spi_device *spi, struct spi_message *msg)
1185 return 0; 1185 return 0;
1186} 1186}
1187 1187
1188/* the spi->mode bits understood by this driver: */
1189#define MODEBITS (SPI_CPOL | SPI_CPHA)
1190
1191static int setup_cs(struct spi_device *spi, struct chip_data *chip, 1188static int setup_cs(struct spi_device *spi, struct chip_data *chip,
1192 struct pxa2xx_spi_chip *chip_info) 1189 struct pxa2xx_spi_chip *chip_info)
1193{ 1190{
@@ -1252,12 +1249,6 @@ static int setup(struct spi_device *spi)
1252 return -EINVAL; 1249 return -EINVAL;
1253 } 1250 }
1254 1251
1255 if (spi->mode & ~MODEBITS) {
1256 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
1257 spi->mode & ~MODEBITS);
1258 return -EINVAL;
1259 }
1260
1261 /* Only alloc on first setup */ 1252 /* Only alloc on first setup */
1262 chip = spi_get_ctldata(spi); 1253 chip = spi_get_ctldata(spi);
1263 if (!chip) { 1254 if (!chip) {
@@ -1493,6 +1484,9 @@ static int __init pxa2xx_spi_probe(struct platform_device *pdev)
1493 drv_data->pdev = pdev; 1484 drv_data->pdev = pdev;
1494 drv_data->ssp = ssp; 1485 drv_data->ssp = ssp;
1495 1486
1487 /* the spi->mode bits understood by this driver: */
1488 master->mode_bits = SPI_CPOL | SPI_CPHA;
1489
1496 master->bus_num = pdev->id; 1490 master->bus_num = pdev->id;
1497 master->num_chipselect = platform_info->num_chipselect; 1491 master->num_chipselect = platform_info->num_chipselect;
1498 master->dma_alignment = DMA_ALIGNMENT; 1492 master->dma_alignment = DMA_ALIGNMENT;