The patch titled atmel_spi: allow transfer when max_speed_hz = 0 has been added to the -mm tree. Its filename is atmel_spi-allow-transfer-when-max_speed_hz-=-0.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: atmel_spi: allow transfer when max_speed_hz = 0 From: Stanislaw Gruszka <stf_xl@xxxxx> For some reason I have to slowdown clock to touchscreen device. In atmel_spi_setup() there is comment that max_speed_hz == 0 means as slow as possible and divider is set to maximum value. But in atmel_spi_transfer() function is check against not zero max_speed_hz with EINVAL returned. Probably driver should setup divider for each transfer based on transfer->speed_hz value, but I think that would be not necessary overhead as all used devices have constant clock. Below patch works fine for me. Signed-off-by: Stanislaw Gruszka <stf_xl@xxxxx> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@xxxxxxxxx> Cc: David Brownell <david-b@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/spi/atmel_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -puN drivers/spi/atmel_spi.c~atmel_spi-allow-transfer-when-max_speed_hz-=-0 drivers/spi/atmel_spi.c --- a/drivers/spi/atmel_spi.c~atmel_spi-allow-transfer-when-max_speed_hz-=-0 +++ a/drivers/spi/atmel_spi.c @@ -670,8 +670,7 @@ static int atmel_spi_transfer(struct spi dev_dbg(controller, "new message %p submitted for %s\n", msg, spi->dev.bus_id); - if (unlikely(list_empty(&msg->transfers) - || !spi->max_speed_hz)) + if (unlikely(list_empty(&msg->transfers))) return -EINVAL; if (as->stopping) _ Patches currently in -mm which might be from stf_xl@xxxxx are atmel_spi-allow-transfer-when-max_speed_hz-=-0.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html