diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-10-14 22:12:23 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-10-19 21:32:01 +0200 |
commit | 1cc3f141f0cb5a822cdef30fb1d92ae6f4176bfa (patch) | |
tree | 1d3bfb1afa2c139db80fcdd232f38ef841777911 /drivers/spi/spi-dw.h | |
parent | spi: dw: eliminate unused threshold variables (diff) | |
download | linux-1cc3f141f0cb5a822cdef30fb1d92ae6f4176bfa.tar.xz linux-1cc3f141f0cb5a822cdef30fb1d92ae6f4176bfa.zip |
spi: dw: introduce spi_shutdown_chip()
This helper disables SPI controller and sets clock to 0.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-dw.h')
-rw-r--r-- | drivers/spi/spi-dw.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h index b75ed327d5a2..35589a270468 100644 --- a/drivers/spi/spi-dw.h +++ b/drivers/spi/spi-dw.h @@ -225,6 +225,12 @@ static inline void spi_reset_chip(struct dw_spi *dws) spi_enable_chip(dws, 1); } +static inline void spi_shutdown_chip(struct dw_spi *dws) +{ + spi_enable_chip(dws, 0); + spi_set_clk(dws, 0); +} + /* * Each SPI slave device to work with dw_api controller should * has such a structure claiming its working mode (poll or PIO/DMA), |