提交 3d352260 编写于 作者: J Joachim Eastwood 提交者: Grant Likely

spi/atmel: fix speed_hz check in atmel_spi_transfer()

atmel_spi_transfer() would check speed_hz and fail if
the speed was changed in the transfer. After commit
"spi: make sure all transfer has proper speed set"
this would happen on all transfers.

Change speed_hz check to only fail if a lower speed
than max is requested.
Signed-off-by: NJoachim Eastwood <manabian@gmail.com>
Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 fe696909
......@@ -847,8 +847,8 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
}
/* FIXME implement these protocol options!! */
if (xfer->speed_hz) {
dev_dbg(&spi->dev, "no protocol options yet\n");
if (xfer->speed_hz < spi->max_speed_hz) {
dev_dbg(&spi->dev, "can't change speed in transfer\n");
return -ENOPROTOOPT;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册