]> 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:05:42 +0000 (16:05 +0800)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:56:13 +0000 (09:56 +0800)
commitee22b7261c4f8f00d269d4da095b7d92df25ed23
tree1cc88359c132f0f28fd7917652e0f9c3cc10123c
parent3c5a621433a2f8d7dbe4f03747c8baa560bf02da
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