LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Baolin Wang <baolin.wang@linaro.org>, Wolfram Sang <wsa@the-dreams.de>
Cc: Mark Brown <broonie@kernel.org>, <linux-i2c@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] i2c: sprd: Prevent i2c accesses after suspend is called
Date: Thu, 3 May 2018 11:26:48 -0500	[thread overview]
Message-ID: <3485f73f-e356-6db0-89fc-d51bf8bdab71@ti.com> (raw)
In-Reply-To: <CAMz4kuJAzr-ybCCmjx_Tcdw6qNYN0wLGQgWsb1H0WEkR4ZpyYg@mail.gmail.com>



On 05/02/2018 12:48 AM, Baolin Wang wrote:
> On 2 May 2018 at 13:23, Wolfram Sang <wsa@the-dreams.de> wrote:
>>
>>>> We should maybe handle this in the core somewhen, though. Or?
>>>
>>> Thanks. Yes, It will more helpful if we can handle this in the i2c core.
>>
>> To understand the issue better: which kind of devices in your system
>> still send I2C transfers when the system is going to suspend? Do you
>> know?
> 
> Now we found the touch screen device will trigger I2C transfers when
> the system is going to suspend.
> 

And you have to fix it (touch screen) - not your i2c driver. Otherwise, you can get
situation when set of I2C transfers (executed from some kthread/work/threaded_irq/..)
will be just interrupted in the middle - usual behavior after this is (I2C timeout) [and/or
not-functional I2C client device [and/or I2C bus stuck (worst case)].

In case, somebody is trying to access I2C after .suspend_noirq() stage I2C bus driver 
should produce big fat warning and, most probably, abort suspend.
Above, in general, can be part of I2C core functionality.

-- 
regards,
-grygorii

  reply	other threads:[~2018-05-03 16:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09  6:40 Baolin Wang
2018-04-09  6:40 ` [PATCH 2/2] i2c: sprd: Fix the i2c count issue Baolin Wang
2018-04-27 12:14   ` Wolfram Sang
2018-04-09 20:56 ` [PATCH 1/2] i2c: sprd: Prevent i2c accesses after suspend is called Grygorii Strashko
2018-04-10  8:08   ` Baolin Wang
2018-04-27 12:14 ` Wolfram Sang
2018-05-02  3:27   ` Baolin Wang
2018-05-02  5:23     ` Wolfram Sang
2018-05-02  5:48       ` Baolin Wang
2018-05-03 16:26         ` Grygorii Strashko [this message]
2018-05-04 12:24           ` I2C PM overhaul needed? (Re: [PATCH 1/2] i2c: sprd: Prevent i2c accesses after suspend is called) Wolfram Sang
2018-05-05  1:54             ` Mark Brown
2018-05-05  8:32               ` Wolfram Sang
2018-05-09  8:18                 ` Mark Brown
2018-05-07 17:48             ` Grygorii Strashko
2018-05-08 16:32               ` Wolfram Sang
2018-05-08 18:31                 ` Peter Rosin
2018-05-11 15:14                 ` Grygorii Strashko

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=3485f73f-e356-6db0-89fc-d51bf8bdab71@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=baolin.wang@linaro.org \
    --cc=broonie@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    --subject='Re: [PATCH 1/2] i2c: sprd: Prevent i2c accesses after suspend is called' \
    /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

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).