diff options
author | Mark Brown <broonie@linaro.org> | 2013-07-28 10:37:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-29 13:00:30 -0400 |
commit | ce74ac80d25bcb1bf5c6638cf376054c9b7c4b0b (patch) | |
tree | 463164726b8316209b1dd1807f5a6ca01b8dd89f /drivers/spi | |
parent | 38315fd48d3de6e9a53b86dfd27684970cd092e9 (diff) |
spi/tegra20-slink: Use core runtime PM
Signed-off-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-tegra20-slink.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index b2fb115df027..c70353672a23 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c | |||
@@ -824,20 +824,6 @@ static int tegra_slink_setup(struct spi_device *spi) | |||
824 | return 0; | 824 | return 0; |
825 | } | 825 | } |
826 | 826 | ||
827 | static int tegra_slink_prepare_transfer(struct spi_master *spi) | ||
828 | { | ||
829 | struct tegra_slink_data *tspi = spi_master_get_devdata(spi); | ||
830 | int ret; | ||
831 | |||
832 | ret = pm_runtime_get_sync(tspi->dev); | ||
833 | if (ret < 0) { | ||
834 | dev_err(tspi->dev, "runtime PM get failed: %d\n", ret); | ||
835 | return ret; | ||
836 | } | ||
837 | |||
838 | return ret; | ||
839 | } | ||
840 | |||
841 | static int tegra_slink_transfer_one_message(struct spi_master *master, | 827 | static int tegra_slink_transfer_one_message(struct spi_master *master, |
842 | struct spi_message *msg) | 828 | struct spi_message *msg) |
843 | { | 829 | { |
@@ -892,15 +878,6 @@ exit: | |||
892 | return ret; | 878 | return ret; |
893 | } | 879 | } |
894 | 880 | ||
895 | static int tegra_slink_unprepare_transfer(struct spi_master *spi) | ||
896 | { | ||
897 | struct tegra_slink_data *tspi = spi_master_get_devdata(spi); | ||
898 | |||
899 | pm_runtime_put(tspi->dev); | ||
900 | |||
901 | return 0; | ||
902 | } | ||
903 | |||
904 | static irqreturn_t handle_cpu_based_xfer(struct tegra_slink_data *tspi) | 881 | static irqreturn_t handle_cpu_based_xfer(struct tegra_slink_data *tspi) |
905 | { | 882 | { |
906 | struct spi_transfer *t = tspi->curr_xfer; | 883 | struct spi_transfer *t = tspi->curr_xfer; |
@@ -1101,9 +1078,8 @@ static int tegra_slink_probe(struct platform_device *pdev) | |||
1101 | /* the spi->mode bits understood by this driver: */ | 1078 | /* the spi->mode bits understood by this driver: */ |
1102 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; | 1079 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; |
1103 | master->setup = tegra_slink_setup; | 1080 | master->setup = tegra_slink_setup; |
1104 | master->prepare_transfer_hardware = tegra_slink_prepare_transfer; | ||
1105 | master->transfer_one_message = tegra_slink_transfer_one_message; | 1081 | master->transfer_one_message = tegra_slink_transfer_one_message; |
1106 | master->unprepare_transfer_hardware = tegra_slink_unprepare_transfer; | 1082 | master->auto_runtime_pm = true; |
1107 | master->num_chipselect = MAX_CHIP_SELECT; | 1083 | master->num_chipselect = MAX_CHIP_SELECT; |
1108 | master->bus_num = -1; | 1084 | master->bus_num = -1; |
1109 | 1085 | ||