Skip to content

Commit 17fa81a

Browse files
diandersbroonie
authored andcommitted
spi: spi-geni-qcom: Print an error when we timeout setting the CS
If we're using geni to manage the chip select line (don't do it--use a GPIO!) and we happen to get a timeout waiting for the chip select command to be completed, no errors are printed even though things might not be in the best shape. Let's add a print. Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20201217142842.v3.4.I666b37646de9652cef438ac7c2c6c2053367fc6b@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 3d7d916 commit 17fa81a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/spi/spi-geni-qcom.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ static void spi_geni_set_cs(struct spi_device *slv, bool set_flag)
223223
spin_unlock_irq(&mas->lock);
224224

225225
time_left = wait_for_completion_timeout(&mas->cs_done, HZ);
226-
if (!time_left)
226+
if (!time_left) {
227+
dev_warn(mas->dev, "Timeout setting chip select\n");
227228
handle_fifo_timeout(spi, NULL);
229+
}
228230

229231
exit:
230232
pm_runtime_put(mas->dev);

0 commit comments

Comments
 (0)