spi: spi-imx: only enable the clocks when we start to transfer a message
Current code keeps the clocks enabled all the time, it wastes the power when there is no operaiton on the spi controller. In order to save the power, this patch adds the two hooks: spi_imx_prepare_message: enable the clocks for this message spi_imx_unprepare_message: disable the clocks. This patch also disables the clocks in the end of the probe. Signed-off-by: NHuang Shijie <b32955@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
Showing
想要评论请 注册 或 登录