Ulf Hansson
a23318feef
i2c: designware: Fix system suspend
...
The commit 8503ff1665 ("i2c: designware: Avoid unnecessary resuming
during system suspend"), may suggest to the PM core to try out the so
called direct_complete path for system sleep. In this path, the PM core
treats a runtime suspended device as it's already in a proper low power
state for system sleep, which makes it skip calling the system sleep
callbacks for the device, except for the ->prepare() and the ->complete()
callbacks.
However, the PM core may unset the direct_complete flag for a parent
device, in case its child device are being system suspended before. In this
scenario, the PM core invokes the system sleep callbacks, no matter if the
device is runtime suspended or not.
Particularly in cases of an existing i2c slave device, the above path is
triggered, which breaks the assumption that the i2c device is always
runtime resumed whenever the dw_i2c_plat_suspend() is being called.
More precisely, dw_i2c_plat_suspend() calls clk_core_disable() and
clk_core_unprepare(), for an already disabled/unprepared clock, leading to
a splat in the log about clocks calls being wrongly balanced and breaking
system sleep.
To still allow the direct_complete path in cases when it's possible, but
also to keep the fix simple, let's runtime resume the i2c device in the
->suspend() callback, before continuing to put the device into low power
state.
Note, in cases when the i2c device is attached to the ACPI PM domain, this
problem doesn't occur, because ACPI's ->suspend() callback, assigned to
acpi_subsys_suspend(), already calls pm_runtime_resume() for the device.
It should also be noted that this change does not fix commit 8503ff1665
("i2c: designware: Avoid unnecessary resuming during system suspend").
Because for the non-ACPI case, the system sleep support was already broken
prior that point.
Cc: <stable@vger.kernel.org> # v4.4+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: John Stultz <john.stultz@linaro.org>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2017-08-14 21:02:42 +02:00
..
accessibility
acpi
tty/serial fixes for 4.13-rc5
2017-08-13 12:33:35 -07:00
amba
android
binder: Use wake up hint for synchronous transactions.
2017-07-17 14:44:19 +02:00
ata
libata: fix a couple of doc build warnings
2017-07-31 08:03:06 -07:00
atm
atm: zatm: Fix an error handling path in 'zatm_init_one()'
2017-07-18 11:37:46 -07:00
auxdisplay
base
driver core fixes for 4.13-rc5
2017-08-13 12:44:18 -07:00
bcma
block
zram: rework copy of compressor name in comp_algorithm_store()
2017-08-10 15:54:07 -07:00
bluetooth
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2017-07-05 12:31:59 -07:00
bus
bus: uniphier-system-bus: set up registers when resuming
2017-08-04 12:57:18 +02:00
cdrom
char
random: fix warning message on ia64 and parisc
2017-08-08 09:36:46 -07:00
clk
clk: keystone: sci-clk: Fix sci_clk_get
2017-08-02 18:37:26 -07:00
clocksource
clocksource/drivers/timer-of: Handle of_irq_get_byname() result correctly
2017-07-17 22:43:00 +02:00
connector
cpufreq
Merge branches 'pm-cpufreq-x86', 'pm-cpufreq-docs' and 'intel_pstate'
2017-08-03 20:29:24 +02:00
cpuidle
powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT states when stop-api fails
2017-08-08 20:21:23 +10:00
crypto
crypto: inside-secure - fix the sha state length in hmac_sha1_setkey
2017-08-03 13:36:11 +08:00
dax
- A few DM integrity fixes that improve performance. One that address
2017-07-28 12:17:17 -07:00
dca
devfreq
PM / devfreq: constify attribute_group structures.
2017-07-06 10:17:24 +09:00
dio
dma
dmaengine updates for 4.13-rc1
2017-07-08 12:36:50 -07:00
dma-buf
dma-buf/sync_file: Allow multiple sync_files to wrap a single dma-fence
2017-07-31 10:55:24 -03:00
edac
eisa
extcon
firewire
firmware
efi: avoid fortify checks in EFI stub
2017-07-12 16:26:02 -07:00
fmc
fpga
fsi
drivers/fsi: fix fsi_slave_mode prototype
2017-07-17 16:13:54 +02:00
gpio
gpio: tegra: fix unbalanced chained_irq_enter/exit
2017-08-02 10:42:38 +02:00
gpu
Merge branch 'linux-4.13' of git://github.com/skeggsb/linux into drm-fixes
2017-08-10 11:45:04 +10:00
hid
HID: ortek: add one more buggy device
2017-07-24 17:38:21 +02:00
hsi
HSI changes for the v4.13 series
2017-07-04 14:28:22 -07:00
hv
vmbus: re-enable channel tasklet
2017-07-17 15:00:47 +02:00
hwmon
hwmon: (applesmc) Avoid buffer overruns
2017-07-15 16:38:56 -07:00
hwspinlock
hwtracing
i2c
i2c: designware: Fix system suspend
2017-08-14 21:02:42 +02:00
ide
ide: avoid warning for timings calculation
2017-07-21 04:37:22 +01:00
idle
iio
First set of IIO fixes for the 4.13 cycle.
2017-07-23 20:54:31 -07:00
infiniband
IPoIB fixes for 4.13
2017-08-07 13:30:40 -04:00
input
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
2017-07-14 22:53:37 -07:00
iommu
iommu/arm-smmu: fix null-pointer dereference in arm_smmu_add_device
2017-08-11 16:56:51 +02:00
ipack
irqchip
irqchip/digicolor: Drop unnecessary static
2017-07-18 21:59:23 +02:00
isdn
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2017-08-09 10:14:04 -07:00
leds
LED updates for 4.13
2017-07-06 11:32:40 -07:00
lguest
lightnvm
lightnvm: pblk: advance bio according to lba index
2017-07-28 08:06:00 -06:00
macintosh
Merge branch 'work.misc-set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2017-07-05 13:13:32 -07:00
mailbox
mailbox: pcc: Fix crash when request PCC channel 0
2017-07-26 02:11:47 +02:00
mcb
md
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
2017-07-28 12:24:21 -07:00
media
media: platform: davinci: drop VPFE_CMD_S_CCDC_RAW_PARAMS
2017-07-26 06:14:33 -04:00
memory
ARM: SoC driver updates
2017-07-04 14:47:47 -07:00
memstick
message
mfd
chrome-platform-for-linus-4.13
2017-07-11 09:55:47 -07:00
misc
mei: exclude device from suspend direct complete optimization
2017-08-10 14:13:18 -07:00
mmc
mmc: block: fix lockdep splat when removing mmc_block module
2017-08-09 13:19:44 +02:00
mtd
mtd: blkdevs: Fix mtd block write failure
2017-08-12 14:53:24 -07:00
mux
mux: mux-core: unregister mux_class in mux_exit()
2017-07-17 16:38:35 +02:00
net
geneve: maximum value of VNI cannot be used
2017-08-09 22:41:04 -07:00
nfc
ntb
ntb: Add error path/handling to Debug FS entry creation
2017-07-06 11:30:08 -04:00
nubus
nvdimm
libnvdimm: fix badblock range handling of ARS range
2017-07-17 11:43:58 -07:00
nvme
nvme: fix directive command numd calculation
2017-08-10 19:53:44 +02:00
nvmem
nvmem: rockchip-efuse: amend compatible rk322x-efuse to rk3228-efuse
2017-07-17 16:15:57 +02:00
of
Merge remote-tracking branches 'asoc/fix/dpcm', 'asoc/fix/imx', 'asoc/fix/msm8916', 'asoc/fix/multi-pcm', 'asoc/fix/of-graph' and 'asoc/fix/pxa' into asoc-linus
2017-08-01 15:17:06 +01:00
oprofile
parisc
parisc: pdc_stable: Fix locking when creating sysfs links
2017-07-31 16:43:13 +02:00
parport
pci
PCI: Add pci_reset_function_locked()
2017-08-01 20:11:02 -05:00
pcmcia
perf
drivers/perf: arm_pmu: Request PMU SPIs with IRQF_PER_CPU
2017-07-27 13:43:22 +01:00
phy
phy: bcm-ns-usb3: fix MDIO_BUS dependency
2017-07-27 17:20:19 -07:00
pinctrl
Pin control fixes for the v4.13 cycle:
2017-08-09 14:30:34 -07:00
platform
platform/x86: intel-vbtn: match power button on press rather than release
2017-08-05 14:37:19 -07:00
pnp
This is the bulk of GPIO changes for the v4.13 series:
2017-07-07 12:40:27 -07:00
power
power supply and reset changes for the v4.13 series (part 2)
2017-07-13 11:47:59 -07:00
powercap
pps
ps3
ptp
ptp: introduce ptp auxiliary worker
2017-08-01 15:22:55 -07:00
pwm
pwm: Changes for v4.13-rc1
2017-07-13 11:49:52 -07:00
rapidio
ras
arm64 updates for 4.13:
2017-07-05 17:09:27 -07:00
regulator
remoteproc
reset
ARM: SoC driver updates
2017-07-04 14:47:47 -07:00
rpmsg
rpmsg updates for v4.13
2017-07-06 15:38:31 -07:00
rtc
RTC for 4.13
2017-07-13 12:15:06 -07:00
s390
s390/qeth: fix L3 next-hop in xmit qeth hdr
2017-08-07 11:24:37 -07:00
sbus
sbus: Convert to using %pOF instead of full_name
2017-07-20 12:37:10 -07:00
scsi
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
2017-08-12 12:08:59 -07:00
sfi
sh
drivers/sh/intc/virq.c: delete an error message for a failed memory allocation in add_virq_to_pirq()
2017-07-06 16:24:30 -07:00
sn
soc
soc: zte: Restrict SOC_ZTE to ARCH_ZX or COMPILE_TEST
2017-07-27 13:12:34 +02:00
spi
Merge branch 'for-spi' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2017-07-08 10:41:53 -07:00
spmi
spmi: pmic-arb: Always allocate ppid_to_apid table
2017-07-17 15:00:47 +02:00
ssb
staging
staging/iio fixes for 4.13-rc5
2017-08-13 12:30:17 -07:00
target
target: Fix node_acl demo-mode + uncached dynamic shutdown regression
2017-08-09 20:55:19 -07:00
tc
tee
thermal
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
2017-07-14 13:12:32 -07:00
thunderbolt
char/misc fixes for 4.13-rc5
2017-08-13 12:41:58 -07:00
tty
tty/serial fixes for 4.13-rc5
2017-08-13 12:33:35 -07:00
uio
usb
USB fixes for 4.13-rc5
2017-08-13 12:27:42 -07:00
uwb
vfio
vfio/pci: Fix handling of RC integrated endpoint PCIe capability size
2017-07-27 10:39:33 -06:00
vhost
Revert "vhost: cache used event for better performance"
2017-07-29 14:15:56 -07:00
video
efifb: allow user to disable write combined mapping.
2017-07-31 18:45:41 +02:00
virt
virtio
virtio-balloon: coding format cleanup
2017-07-25 16:37:35 +03:00
vlynq
vme
w1
w1: omap-hdq: fix error return code in omap_hdq_probe()
2017-07-17 16:48:15 +02:00
watchdog
Merge git://www.linux-watchdog.org/linux-watchdog
2017-07-11 09:59:37 -07:00
xen
xen/events: Fix interrupt lost during irq_disable and irq_enable
2017-08-11 16:46:01 +02:00
zorro
Kconfig
Makefile