spi: tegra: macro for enable/disable runtime pm inside driver
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 29 Jun 2012 11:50:59 +0000 (16:50 +0530)
committerRohan Somvanshi <rsomvanshi@nvidia.com>
Mon, 2 Jul 2012 13:20:35 +0000 (06:20 -0700)
commitad8fabee431584601e7184da76604ad3dfdd1109
tree09dd13ec002d4391a192c13250520e36d6189205
parent429d909e14eefa0331b1cd30490bce4d7ff45f33
spi: tegra: macro for enable/disable runtime pm inside driver

Add macro in the spi tegra driver for enabling/disabling
runtime PM specific to this driver.
Setting macro SPI_PM_RUNTIME_ENABLE to 1 will enable the
runtime pm and resetting to 0 make runtime pm disable.

The dynamic clock management i.e. enabling the clock before
transfer and disabling after transfer complete is done in
both the cases.
When runtime pm is enabled then clock control is done through
runtime pm callbacks otherwise it will be directly call the
clock control apis.

bug 1003103

Change-Id: I2544e8f3b3e5605e0247791653a5a0ed6c36e9b6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/112142
Reviewed-by: Automatic_Commit_Validation_User
drivers/spi/spi-tegra.c