Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166672
b: refs/heads/master
c: 6c23e5d
h: refs/heads/master
v: v3
  • Loading branch information
Sascha Hauer authored and Linus Torvalds committed Oct 1, 2009
1 parent 6d9bfda commit 45bf849
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 462d26b5d2f17b6258f33c4d1e3310089b006489
refs/heads/master: 6c23e5d43313a829fc4d07fa43a1f853f288b45f
7 changes: 6 additions & 1 deletion trunk/drivers/spi/spi_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,12 +478,18 @@ static int spi_imx_transfer(struct spi_device *spi,

static int spi_imx_setup(struct spi_device *spi)
{
struct spi_imx_data *spi_imx = spi_master_get_devdata(spi->master);
int gpio = spi_imx->chipselect[spi->chip_select];

if (!spi->bits_per_word)
spi->bits_per_word = 8;

pr_debug("%s: mode %d, %u bpw, %d hz\n", __func__,
spi->mode, spi->bits_per_word, spi->max_speed_hz);

if (gpio >= 0)
gpio_direction_output(gpio, spi->mode & SPI_CS_HIGH ? 0 : 1);

spi_imx_chipselect(spi, BITBANG_CS_INACTIVE);

return 0;
Expand Down Expand Up @@ -532,7 +538,6 @@ static int __init spi_imx_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "can't get cs gpios");
goto out_master_put;
}
gpio_direction_output(spi_imx->chipselect[i], 1);
}

spi_imx->bitbang.chipselect = spi_imx_chipselect;
Expand Down

0 comments on commit 45bf849

Please sign in to comment.