Skip to content

Commit

Permalink
Merge pull request #6 from kamalmostafa/rpi-3.2.27
Browse files Browse the repository at this point in the history
spi/spi-bcm2708: respect per-transfer SPI clock speed_hz value
  • Loading branch information
bootc committed Oct 28, 2012
2 parents 1afbbe7 + 2aa4347 commit c58d10e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/spi/spi-bcm2708.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ static int bcm2708_setup_state(struct spi_master *master,
if (state) {
state->cs = cs;
state->cdiv = cdiv;
dev_dbg(dev, "setup: want %d Hz; "
"bus_hz=%lu / cdiv=%u == %lu Hz; "
"mode %u: cs 0x%08X\n",
hz, bus_hz, cdiv, bus_hz/cdiv, mode, cs);
}

return 0;
Expand All @@ -277,7 +281,8 @@ static int bcm2708_process_transfer(struct bcm2708_spi *bs,

if (xfer->bits_per_word || xfer->speed_hz) {
ret = bcm2708_setup_state(spi->master, &spi->dev, &state,
spi->max_speed_hz, spi->chip_select, spi->mode,
xfer->speed_hz ? xfer->speed_hz : spi->max_speed_hz,
spi->chip_select, spi->mode,
spi->bits_per_word);
if (ret)
return ret;
Expand Down

0 comments on commit c58d10e

Please sign in to comment.