spi_qsd: Auto-select nearest lower available clock rate
Specifying max clock frequency for SPI, via platform data, requires a frequency that is available to SPI. The frequencies that are available to SPI and the devices max-frequency are specified in different places and in different files. As a result theses values can easily go out of sync. SPI devices typically can operate at some maximum frequency, with some tolerance for the actual-frequency being lower. SPI users typically know their target-device's max-speed, but they have to dig in platform data files to find the best matching frequency that is available. This patch lets users specify the device's max-frequency, while the actual frequency is automatically selected by the driver. The selected frequency is the same as the requested one, or the nearest lower one. Change-Id: I293ec1b66ad56e4a2b4643482917f79dabd7a758 Signed-off-by:Gilad Avidov <gavidov@codeaurora.org> Signed-off-by:
Alok Chauhan <alokc@codeaurora.org>
Loading
Please register or sign in to comment