diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2016-07-04 13:01:15 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2016-09-29 06:51:41 +0200 |
commit | 8fdf8dc5afdb02625084356ebd7c0d1c7494a00e (patch) | |
tree | 6e14a8c72c8e42b049eea2f170f876125cc94b14 /drivers | |
parent | eeb6061f4b93cdd2c946e354ff69224163636282 (diff) |
spi-tegra114: Warning when clock rate switch fails
When setting transfer clock rate out of bounds
old clock rate was used without any notice.
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi-tegra114.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 5f693d0ddfbc..400a8a464ce2 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -703,7 +703,10 @@ static int tegra_spi_start_transfer_one(struct spi_device *spi, if (!speed) speed = tspi->spi_max_frequency; if (speed != tspi->cur_speed) { - clk_set_rate(tspi->clk, speed); + ret = clk_set_rate(tspi->clk, speed); + if (ret < 0) { + dev_warn(tspi->dev, "Error setting SPI clock rate: %d\n", ret); + } tspi->cur_speed = speed; } |