linux/drivers/spi
Krzysztof Kozlowski 9d7fd21acb spi/s3c64xx: Fix doubled clock disable on suspend
Fix doubled clock disable and unprepare during PM suspend which triggered
the warnings:

WARNING: at drivers/clk/clk.c:800 clk_disable+0x18/0x24()
Modules linked in:
CPU: 0 PID: 1745 Comm: sh Not tainted 3.10.14-01211-ge2549bb-dirty #62
[<c0015980>] (unwind_backtrace+0x0/0x138) from [<c0012a44>] (show_stack+0x10/0x14)
[<c0012a44>] (show_stack+0x10/0x14) from [<c0022818>] (warn_slowpath_common+0x4c/0x68)
[<c0022818>] (warn_slowpath_common+0x4c/0x68) from [<c0022850>] (warn_slowpath_null+0x1c/0x24)
[<c0022850>] (warn_slowpath_null+0x1c/0x24) from [<c036e274>] (clk_disable+0x18/0x24)
[<c036e274>] (clk_disable+0x18/0x24) from [<c02d5f78>] (s3c64xx_spi_suspend+0x28/0x54)
[<c02d5f78>] (s3c64xx_spi_suspend+0x28/0x54) from [<c02b3a54>] (platform_pm_suspend+0x2c/0x5c)
[<c02b3a54>] (platform_pm_suspend+0x2c/0x5c) from [<c02b8a30>] (dpm_run_callback+0x44/0x7c)
[<c02b8a30>] (dpm_run_callback+0x44/0x7c) from [<c02b8b70>] (__device_suspend+0x108/0x300)
[<c02b8b70>] (__device_suspend+0x108/0x300) from [<c02ba4e0>] (dpm_suspend+0x54/0x208)
[<c02ba4e0>] (dpm_suspend+0x54/0x208) from [<c0066bcc>] (suspend_devices_and_enter+0x98/0x458)
[<c0066bcc>] (suspend_devices_and_enter+0x98/0x458) from [<c0067150>] (pm_suspend+0x1c4/0x25c)
[<c0067150>] (pm_suspend+0x1c4/0x25c) from [<c0066044>] (state_store+0x6c/0xbc)
[<c0066044>] (state_store+0x6c/0xbc) from [<c0203290>] (kobj_attr_store+0x14/0x20)
[<c0203290>] (kobj_attr_store+0x14/0x20) from [<c0157530>] (sysfs_write_file+0xfc/0x164)
[<c0157530>] (sysfs_write_file+0xfc/0x164) from [<c00fd6b0>] (vfs_write+0xbc/0x1bc)
[<c00fd6b0>] (vfs_write+0xbc/0x1bc) from [<c00fdaf0>] (SyS_write+0x40/0x68)
[<c00fdaf0>] (SyS_write+0x40/0x68) from [<c000ea80>] (ret_fast_syscall+0x0/0x3c)

The clocks may be already disabled before suspending. Check PM runtime
suspend status and disable clocks only if device is not suspended.
During resume do not enable the clocks if device is runtime suspended.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-22 09:35:30 +01:00
..
Kconfig spi: s3c64xx: Allow build on all Samsung platforms 2013-09-26 12:08:46 +01:00
Makefile Merge remote-tracking branch 'spi/topic/qspi' into spi-next 2013-09-01 13:49:06 +01:00
spi-altera.c ARM: SoC DT updates for 3.12 2013-09-06 13:26:27 -07:00
spi-ath79.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +01:00
spi-atmel.c spi/atmel: Fix format specifier warnings 2013-07-31 17:55:00 +01:00
spi-au1550.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +01:00
spi-bcm63xx.c Merge remote-tracking branch 'spi/topic/qspi' into spi-next 2013-09-01 13:49:06 +01:00
spi-bcm2835.c spi: bcm2835: Add spi_master_get() call to prevent use after free 2013-08-22 19:07:51 +01:00
spi-bfin5xx.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +01:00
spi-bfin-sport.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +01:00
spi-bfin-v3.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-09-01 13:49:03 +01:00
spi-bitbang-txrx.h
spi-bitbang.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-09-06 09:36:28 -07:00
spi-butterfly.c
spi-clps711x.c spi/clps711x: Remove unneeded devm_ deallocations 2013-07-15 11:36:33 +01:00
spi-coldfire-qspi.c Merge remote-tracking branch 'spi/topic/qspi' into spi-next 2013-09-01 13:49:06 +01:00
spi-davinci.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-09-01 13:49:03 +01:00
spi-dw-mid.c
spi-dw-mmio.c spi: remove unnecessary platform_set_drvdata() 2013-05-13 18:00:30 +04:00
spi-dw-pci.c spi: Remove HOTPLUG section attributes 2012-12-07 17:06:43 +00:00
spi-dw.c spi: convert drivers to use bits_per_word_mask 2013-05-29 20:48:17 +01:00
spi-dw.h
spi-efm32.c spi: efm32: Fix build error 2013-08-31 16:29:14 +01:00
spi-ep93xx.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-09-01 13:49:03 +01:00
spi-falcon.c spi/mips-lantiq: set SPI_MASTER_HALF_DUPLEX flag 2013-02-05 17:16:55 +00:00
spi-fsl-cpm.c spi/spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment 2013-04-07 10:07:54 +01:00
spi-fsl-cpm.h spi/spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment 2013-04-07 10:07:54 +01:00
spi-fsl-dspi.c spi:Add Freescale DSPI driver for Vybrid VF610 platform 2013-08-22 11:33:13 +01:00
spi-fsl-espi.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +01:00
spi-fsl-lib.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +01:00
spi-fsl-lib.h spi/spi-fsl-spi: Add support for gpio chipselects for GRLIB type cores 2013-04-07 10:07:57 +01:00
spi-fsl-spi.c PTR_RET() is a weird name, and led to some confusing usage. We ended 2013-09-04 17:31:11 -07:00
spi-fsl-spi.h spi/spi-fsl-spi: Add support for Aeroflex Gaisler GRLIB cores normally running on SPARC 2013-04-07 10:07:56 +01:00
spi-gpio.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +01:00
spi-imx.c spi/imx: expose module alias for loading from device-tree 2013-07-29 12:40:08 +01:00
spi-lm70llp.c spi: By default setup spi_masters with 1 chipselect and dynamics bus number 2012-05-19 23:42:08 -06:00
spi-mpc52xx-psc.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +01:00
spi-mpc52xx.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-mpc512x-psc.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-09-01 13:49:03 +01:00
spi-mxs.c spi: spi-mxs: Remove unused bits_per_word variable 2013-08-06 18:06:29 +01:00
spi-nuc900.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-09-01 13:49:03 +01:00
spi-oc-tiny.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-09-01 13:49:03 +01:00
spi-octeon.c spi: octeon: Convert to use bits_per_word_mask 2013-08-20 11:34:08 +01:00
spi-omap2-mcspi.c Merge remote-tracking branch 'spi/topic/qspi' into spi-next 2013-09-01 13:49:06 +01:00
spi-omap-100k.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-09-01 13:49:03 +01:00
spi-omap-uwire.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-orion.c Merge remote-tracking branch 'spi/topic/orion' into spi-next 2013-09-01 13:49:02 +01:00
spi-pl022.c Merge remote-tracking branch 'spi/topic/qspi' into spi-next 2013-09-01 13:49:06 +01:00
spi-ppc4xx.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-06-26 16:21:02 +01:00
spi-pxa2xx-dma.c Merge remote-tracking branch 'spi/topic/pxa' into spi-next 2013-06-26 16:21:03 +01:00
spi-pxa2xx-pci.c spi/pxa2xx-pci: correct the return value check of pcim_iomap_regions() 2013-03-12 18:30:56 +00:00
spi-pxa2xx-pxadma.c spi/pxa2xx: break out the private DMA API usage into a separate file 2013-02-08 12:15:21 +00:00
spi-pxa2xx.c Merge remote-tracking branch 'spi/topic/qspi' into spi-next 2013-09-01 13:49:06 +01:00
spi-pxa2xx.h spi/pxa2xx: add support for Intel Low Power Subsystem SPI 2013-02-08 13:14:40 +00:00
spi-rspi.c Merge remote-tracking branch 'spi/topic/rspi' into spi-next 2013-09-01 13:49:08 +01:00
spi-s3c24xx-fiq.h
spi-s3c24xx-fiq.S
spi-s3c24xx.c spi: Use dev_get_drvdata at appropriate places 2013-08-29 13:57:14 +01:00
spi-s3c64xx.c spi/s3c64xx: Fix doubled clock disable on suspend 2013-10-22 09:35:30 +01:00
spi-sc18is602.c spi/sc18is602: Return -EINVAL for probe failures due to I2C function mismatch 2012-08-23 12:13:54 +01:00
spi-sh-hspi.c Merge remote-tracking branch 'spi/topic/sh-hspi' into spi-next 2013-09-01 13:49:10 +01:00
spi-sh-msiof.c Merge remote-tracking branch 'spi/topic/sh-msiof' into spi-next 2013-09-01 13:49:11 +01:00
spi-sh-sci.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +01:00
spi-sh.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-sirf.c Merge remote-tracking branch 'spi/topic/sirf' into spi-next 2013-09-01 13:49:12 +01:00
spi-tegra20-sflash.c spi/tegra20-sflash: Use core runtime PM 2013-07-29 18:00:26 +01:00
spi-tegra20-slink.c spi/tegra20-slink: Use core runtime PM 2013-07-29 18:00:30 +01:00
spi-tegra114.c Merge remote-tracking branch 'spi/topic/tegra' into spi-next 2013-09-01 13:49:13 +01:00
spi-ti-qspi.c spi/qspi: fix missing unlock on error in ti_qspi_start_transfer_one() 2013-09-01 13:47:55 +01:00
spi-ti-ssp.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +01:00
spi-tle62x0.c Merge remote-tracking branch 'spi/topic/tel62x0' into spi-next 2013-09-01 13:49:14 +01:00
spi-topcliff-pch.c spi-topcliff-pch: Add MODULE_DEVICE_TABLE 2013-08-13 01:00:51 +01:00
spi-txx9.c spi/txx9: Use linux/gpio.h not asm/gpio.h 2013-07-30 12:16:04 +01:00
spi-xcomm.c spi: convert drivers to use bits_per_word_mask 2013-05-29 20:48:17 +01:00
spi-xilinx.c Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-09-01 13:49:03 +01:00
spi.c spi: core: Add devm_spi_register_master() 2013-09-17 00:59:36 +01:00
spidev.c PTR_RET is now PTR_ERR_OR_ZERO(): Replace most. 2013-07-15 11:25:01 +09:30