From: Wolfram Sang <wsa@the-dreams.de>
To: Evan Green <evgreen@chromium.org>
Cc: andy.gross@linaro.org, david.brown@linaro.org,
Karthikeyan Ramasubramanian <kramasub@codeaurora.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
swboyd@chromium.org, dianders@chromium.org,
Girish Mahadevan <girishm@codeaurora.org>,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: i2c-qcom-geni: Fix suspend clock handling
Date: Tue, 31 Jul 2018 21:20:32 +0200 [thread overview]
Message-ID: <20180731192032.5l7tcdbywlfejzig@ninjato> (raw)
In-Reply-To: <20180709234937.176154-1-evgreen@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 2039 bytes --]
On Mon, Jul 09, 2018 at 04:49:37PM -0700, Evan Green wrote:
> pm_runtime_suspended can return 0 even if the last runtime power
> management function called in the device was a suspend call. This
> trips up the i2c-qcom-geni's suspend_noirq accounting, which was
> trying to use the function to determine if it should disable clocks
> or if that had already been done.
>
> The fix is to track whether or not clocks have been enabled explicitly
> in the driver with a new member. While in there, also honor the return
> value of geni_se_resources_off, which can technically fail.
>
> An example of the warning generated during suspend:
> [ 68.314733] WARNING: CPU: 0 PID: 1990 at drivers/clk/clk.c:595 clk_core_disable+0x28/0x200
> [ 68.464576] Call trace:
> [ 68.554410] [<ffffff80083f0ed0>] clk_core_disable+0x28/0x200
> [ 68.560244] [<ffffff80083f349c>] clk_disable+0x38/0x4c
> [ 68.565541] [<ffffff8008408910>] geni_se_resources_off+0x40/0x74
> [ 68.571731] [<ffffff800862aadc>] geni_i2c_runtime_suspend+0x2c/0x3c
> [ 68.578185] [<ffffff800862ae6c>] geni_i2c_suspend_noirq+0x38/0x68
> [ 68.584475] [<ffffff800852bd40>] dpm_run_callback+0x104/0x210
> [ 68.590404] [<ffffff800852c3d4>] __device_suspend_noirq+0x158/0x1a8
> [ 68.596859] [<ffffff800852dff0>] dpm_noirq_suspend_devices+0x180/0x38c
> [ 68.603594] [<ffffff80080fdebc>] suspend_devices_and_enter+0x49c/0x964
> [ 68.610321] [<ffffff80080fea14>] pm_suspend+0x690/0x6e0
> [ 68.615712] [<ffffff80080fc930>] state_store+0xd4/0xf8
> [ 68.621014] [<ffffff80088a57f0>] kobj_attr_store+0x18/0x28
> [ 68.626672] [<ffffff8008297a54>] sysfs_kf_write+0x5c/0x68
> [ 68.632240] [<ffffff8008296a00>] kernfs_fop_write+0x174/0x1b8
> [ 68.638177] [<ffffff800821a2c4>] __vfs_write+0x58/0x160
> [ 68.643567] [<ffffff800821a5d8>] vfs_write+0xcc/0x184
> [ 68.648780] [<ffffff800821a850>] SyS_write+0x64/0xb4
>
> Signed-off-by: Evan Green <evgreen@chromium.org>
Applied to for-next (squashed into the main driver), thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-07-31 19:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 23:49 [PATCH] i2c: i2c-qcom-geni: Fix suspend clock handling Evan Green
2018-07-12 22:03 ` Wolfram Sang
2018-07-13 22:21 ` Karthik Ramasubramanian
2018-07-13 22:24 ` Evan Green
2018-07-31 19:20 ` Wolfram Sang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180731192032.5l7tcdbywlfejzig@ninjato \
--to=wsa@the-dreams.de \
--cc=andy.gross@linaro.org \
--cc=david.brown@linaro.org \
--cc=dianders@chromium.org \
--cc=evgreen@chromium.org \
--cc=girishm@codeaurora.org \
--cc=kramasub@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swboyd@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).