• Sudeep Holla's avatar
    i2c: qup: skip qup_i2c_suspend if the device is already runtime suspended · 331dcf42
    Sudeep Holla authored
    If the i2c device is already runtime suspended, if qup_i2c_suspend is
    executed during suspend-to-idle or suspend-to-ram it will result in the
    following splat:
    
    WARNING: CPU: 3 PID: 1593 at drivers/clk/clk.c:476 clk_core_unprepare+0x80/0x90
    Modules linked in:
    
    CPU: 3 PID: 1593 Comm: bash Tainted: G        W       4.8.0-rc3 #14
    Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
    PC is at clk_core_unprepare+0x80/0x90
    LR is at clk_unprepare+0x28/0x40
    pc : [<ffff0000086eecf0>] lr : [<ffff0000086f0c58>] pstate: 60000145
    Call trace:
     clk_core_unprepare+0x80/0x90
     qup_i2c_disable_clocks+0x2c/0x68
     qup_i2c_suspend+0x10/0x20
     platform_pm_suspend+0x24/0x68
     ...
    
    This patch fixes the issue by executing qup_i2c_pm_suspend_runtime
    conditionally in qup_i2c_suspend.
    Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
    Reviewed-by: default avatarAndy Gross <andy.gross@linaro.org>
    Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
    Cc: stable@kernel.org
    331dcf42
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
i2c-acorn.c Loading commit data...
i2c-ali1535.c Loading commit data...
i2c-ali1563.c Loading commit data...
i2c-ali15x3.c Loading commit data...
i2c-amd756-s4882.c Loading commit data...
i2c-amd756.c Loading commit data...
i2c-amd8111.c Loading commit data...
i2c-at91.c Loading commit data...
i2c-au1550.c Loading commit data...
i2c-axxia.c Loading commit data...
i2c-bcm-iproc.c Loading commit data...
i2c-bcm-kona.c Loading commit data...
i2c-bcm2835.c Loading commit data...
i2c-bfin-twi.c Loading commit data...
i2c-brcmstb.c Loading commit data...
i2c-cadence.c Loading commit data...
i2c-cbus-gpio.c Loading commit data...
i2c-cpm.c Loading commit data...
i2c-cros-ec-tunnel.c Loading commit data...
i2c-davinci.c Loading commit data...
i2c-designware-baytrail.c Loading commit data...
i2c-designware-core.c Loading commit data...
i2c-designware-core.h Loading commit data...
i2c-designware-pcidrv.c Loading commit data...
i2c-designware-platdrv.c Loading commit data...
i2c-digicolor.c Loading commit data...
i2c-diolan-u2c.c Loading commit data...
i2c-dln2.c Loading commit data...
i2c-efm32.c Loading commit data...
i2c-eg20t.c Loading commit data...
i2c-elektor.c Loading commit data...
i2c-emev2.c Loading commit data...
i2c-exynos5.c Loading commit data...
i2c-gpio.c Loading commit data...
i2c-highlander.c Loading commit data...
i2c-hix5hd2.c Loading commit data...
i2c-hydra.c Loading commit data...
i2c-i801.c Loading commit data...
i2c-ibm_iic.c Loading commit data...
i2c-ibm_iic.h Loading commit data...
i2c-img-scb.c Loading commit data...
i2c-imx.c Loading commit data...
i2c-iop3xx.c Loading commit data...
i2c-iop3xx.h Loading commit data...
i2c-isch.c Loading commit data...
i2c-ismt.c Loading commit data...
i2c-jz4780.c Loading commit data...
i2c-kempld.c Loading commit data...
i2c-lpc2k.c Loading commit data...
i2c-meson.c Loading commit data...
i2c-mpc.c Loading commit data...
i2c-mt65xx.c Loading commit data...
i2c-mv64xxx.c Loading commit data...
i2c-mxs.c Loading commit data...
i2c-nforce2-s4985.c Loading commit data...
i2c-nforce2.c Loading commit data...
i2c-nomadik.c Loading commit data...
i2c-ocores.c Loading commit data...
i2c-octeon.c Loading commit data...
i2c-omap.c Loading commit data...
i2c-opal.c Loading commit data...
i2c-parport-light.c Loading commit data...
i2c-parport.c Loading commit data...
i2c-parport.h Loading commit data...
i2c-pasemi.c Loading commit data...
i2c-pca-isa.c Loading commit data...
i2c-pca-platform.c Loading commit data...
i2c-piix4.c Loading commit data...
i2c-pmcmsp.c Loading commit data...
i2c-pnx.c Loading commit data...
i2c-powermac.c Loading commit data...
i2c-puv3.c Loading commit data...
i2c-pxa-pci.c Loading commit data...
i2c-pxa.c Loading commit data...
i2c-qup.c Loading commit data...
i2c-rcar.c Loading commit data...
i2c-riic.c Loading commit data...
i2c-rk3x.c Loading commit data...
i2c-robotfuzz-osif.c Loading commit data...
i2c-s3c2410.c Loading commit data...
i2c-scmi.c Loading commit data...
i2c-sh7760.c Loading commit data...
i2c-sh_mobile.c Loading commit data...
i2c-sibyte.c Loading commit data...
i2c-simtec.c Loading commit data...
i2c-sirf.c Loading commit data...
i2c-sis5595.c Loading commit data...
i2c-sis630.c Loading commit data...
i2c-sis96x.c Loading commit data...
i2c-st.c Loading commit data...
i2c-stu300.c Loading commit data...
i2c-sun6i-p2wi.c Loading commit data...
i2c-taos-evm.c Loading commit data...
i2c-tegra.c Loading commit data...
i2c-tiny-usb.c Loading commit data...
i2c-uniphier-f.c Loading commit data...
i2c-uniphier.c Loading commit data...
i2c-versatile.c Loading commit data...
i2c-via.c Loading commit data...
i2c-viapro.c Loading commit data...
i2c-viperboard.c Loading commit data...
i2c-wmt.c Loading commit data...
i2c-xgene-slimpro.c Loading commit data...
i2c-xiic.c Loading commit data...
i2c-xlp9xx.c Loading commit data...
i2c-xlr.c Loading commit data...
scx200_acb.c Loading commit data...