]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
spi: spi-imx: only enable the clocks when we start to transfer a message
authorHuang Shijie <b32955@freescale.com>
Wed, 23 Oct 2013 08:31:50 +0000 (16:31 +0800)
committerMark Brown <broonie@linaro.org>
Wed, 23 Oct 2013 09:05:05 +0000 (10:05 +0100)
commit9e556dcc55774c9a1032f32baa0e5cfafede8b70
tree301c4529564252aba7328e5bf6d264a20390db5f
parent31d141e3a666269a3b6fcccddb0351caf7454240
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: Huang Shijie <b32955@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-imx.c