]> git.ipfire.org Git - people/arne_f/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:22:29 +0000 (11:22 +0200)
commit488efbc0b49ad36a2db85b6aa5ffcd0eb3b03335
tree7642fcc1e44f0130fd50d12cf79f7d8eeac52e7b
parent1517868cacc964a108c5f9abb244570ef79b365c
spi: stm32: fix stm32_spi_prepare_mbr in case of odd clk_rate

[ Upstream commit 9cc61973bf9385b19ff5dda4a2a7e265fcba85e4 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-stm32.c