Linux I2C development
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Len Brown <lenb@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Takashi Iwai <tiwai@suse.de>,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH v3 1/2] i2c: designware: Never suspend i2c-busses used for accessing the system PMIC
Date: Thu, 23 Mar 2017 21:07:18 +0100	[thread overview]
Message-ID: <20170323200718.jh7ytrbpemfwboll@ninjato> (raw)
In-Reply-To: <20170313222510.466-1-hdegoede@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]

On Mon, Mar 13, 2017 at 11:25:09PM +0100, Hans de Goede wrote:
> Currently we are already setting a pm_runtime_disabled flag and disabling
> runtime-pm for i2c-busses used for accessing the system PMIC on x86.
> But this is not enough, there are ACPI opregions which may want to access
> the PMIC during late-suspend and early-resume, so we need to completely
> disable pm to be safe.
> 
> This commit renames the flag from pm_runtime_disabled to pm_disabled and
> adds the following new behavior if the flag is set:
> 
> 1) Call dev_pm_syscore_device(dev, true) which disables normal suspend /
>    resume and remove the pm_runtime_disabled check from dw_i2c_plat_resume
>    since that will now never get called. This fixes suspend_late handlers
>    which use ACPI PMIC opregions causing errors like these:
> 
>   PM: Suspending system (freeze)
>   PM: suspend of devices complete after 1127.751 msecs
>   i2c_designware 808622C1:06: timeout waiting for bus ready
>   ACPI Exception: AE_ERROR, Returned by Handler for [UserDefinedRegion]
>   acpi 80860F14:02: Failed to change power state to D3hot
>   PM: late suspend of devices failed
> 
> 2) Set IRQF_NO_SUSPEND irq flag. This fixes resume_early handlers which
>    handlers which use ACPI PMIC opregions causing errors like these:
> 
>   PM: resume from suspend-to-idle
>   i2c_designware 808622C1:06: controller timed out
>   ACPI Exception: AE_ERROR, Returned by Handler for [UserDefinedRegion]
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2017-03-23 20:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13 22:25 [PATCH v3 1/2] i2c: designware: Never suspend i2c-busses used for accessing the system PMIC Hans de Goede
2017-03-13 22:25 ` [PATCH v3 2/2] i2c: designware: Disable pm for PMIC i2c-bus even if there is no _SEM method Hans de Goede
2017-03-23 20:07   ` Wolfram Sang
2017-03-23 20:07 ` 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=20170323200718.jh7ytrbpemfwboll@ninjato \
    --to=wsa@the-dreams.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=tiwai@suse.de \
    /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