]> git.baikalelectronics.ru Git - kernel.git/commit
spi: stm32: fix stm32_spi_prepare_mbr in case of odd clk_rate
authorAmelie Delaunay <amelie.delaunay@st.com>
Mon, 10 Aug 2020 07:12:36 +0000 (09:12 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 10 Aug 2020 18:46:43 +0000 (19:46 +0100)
commitc9f6b6d881cb6ca230cb171c704ca4512d3cf95f
treefa182a40d677509123a611bf0c2ece2aefb4d313
parentb7f0a2e58b53a5cab69d3146a94221ad046578b9
spi: stm32: fix stm32_spi_prepare_mbr in case of odd clk_rate

Fix spi->clk_rate when it is odd to the nearest lowest even value because
minimum SPI divider is 2.

Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Alain Volmat <alain.volmat@st.com>
Link: https://lore.kernel.org/r/1597043558-29668-4-git-send-email-alain.volmat@st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32.c