Skip to content
Commit 5cb95789 authored by Martí Bolívar's avatar Martí Bolívar Committed by Andrew Boie
Browse files

spi: stm32: fix clock prescaler calculation



The current prescaler calculation incorrectly fails to configure the
desired frequency when it is possible to match it exactly. Fix this.

Without this patch, if the user requests frequency N Hz, and there is
a SPI prescaler that can match this frequency exactly, the actual
frequency chosen by spi_stm32_configure() will be N/2 Hz.

Signed-off-by: default avatarMarti Bolivar <marti.bolivar@linaro.org>
parent 03a62726
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment