From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux PM <linux-pm@vger.kernel.org>,
linux-i2c <linux-i2c@vger.kernel.org>,
Wolfram Sang <wsa@the-dreams.de>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Kevin Hilman <khilman@kernel.org>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Jisheng Zhang <jszhang@marvell.com>,
John Stultz <john.stultz@linaro.org>,
Guodong Xu <guodong.xu@linaro.org>,
Sumit Semwal <sumit.semwal@linaro.org>,
Haojian Zhuang <haojian.zhuang@linaro.org>,
Johannes Stezenbach <js@sig21.net>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [RFT][PATCH v2 2/2] PM / i2c: designware: Clean up system sleep handling without ACPI
Date: Tue, 5 Sep 2017 18:41:47 +0300 [thread overview]
Message-ID: <20170905154147.GC2477@lahna.fi.intel.com> (raw)
In-Reply-To: <CAJZ5v0hXQEoULXuexn53jqo+ANB+gbtWDAL32wfvcwfh2Hm_VA@mail.gmail.com>
On Tue, Sep 05, 2017 at 05:32:07PM +0200, Rafael J. Wysocki wrote:
> On Tue, Sep 5, 2017 at 5:24 PM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > On Tue, Sep 05, 2017 at 05:04:21PM +0200, Rafael J. Wysocki wrote:
> >> On Tuesday, September 5, 2017 5:07:44 PM CEST Mika Westerberg wrote:
> >> > On Tue, Sep 05, 2017 at 04:55:44PM +0200, Rafael J. Wysocki wrote:
> >> > > On Tuesday, September 5, 2017 4:58:35 PM CEST Mika Westerberg wrote:
> >> > > > On Tue, Sep 05, 2017 at 04:46:11PM +0200, Rafael J. Wysocki wrote:
> >> > > > > On Tuesday, September 5, 2017 4:45:11 PM CEST Mika Westerberg wrote:
> >> > > > > > On Mon, Sep 04, 2017 at 12:01:54PM +0200, Rafael J. Wysocki wrote:
> >> > > > > > > static const struct dev_pm_ops dw_i2c_dev_pm_ops = {
> >> > > > > > > - .prepare = dw_i2c_plat_prepare,
> >> > > > > > > - .complete = dw_i2c_plat_complete,
> >> > > > > > > - SET_SYSTEM_SLEEP_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume)
> >> > > > > > > - SET_RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend,
> >> > > > > > > - dw_i2c_plat_resume,
> >> > > > > > > - NULL)
> >> > > > > > > + SET_LATE_SYSTEM_SLEEP_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume)
> >> > > > > >
> >> > > > > > This seems to cause problem with intel-lpss MFD driver because it uses
> >> > > > > > .suspend() and .resume() instead of .suspend_late() and .resume_early().
> >> > > > >
> >> > > > > OK, so there is one more dependency here.
> >> > > > >
> >> > > > > Can you please point me to this code?
> >> > > >
> >> > > > It is in drivers/mfd/intel-lpss.c. See intel_lpss_resume().
> >> > > >
> >> > >
> >> > > Looking at it, but I don't quite see how this is related to the
> >> > > i2c-designware-platedv suspend/resume ...
> >> >
> >> > intel-lpss is the parent device for i2c-designware-platdrv. It is
> >> > supposed to handle all LPSS specific stuff, like bringing the PCI device
> >> > out of reset before the i2c-designware-platdrv does its own resume
> >> > things.
> >>
> >> Yes, I see.
> >>
> >> OK, so what about moving its suspend/resume to the late/early stages?
> >>
> >> Would the parent of it be confused?
> >
> > It seems to work. I did following change and now suspend/resume works
> > fine with your patch series.
>
> OK, thanks!
>
> > diff --git a/drivers/mfd/intel-lpss.h b/drivers/mfd/intel-lpss.h
> > index 694116630ffa..c987f7fe6c74 100644
> > --- a/drivers/mfd/intel-lpss.h
> > +++ b/drivers/mfd/intel-lpss.h
> > @@ -38,8 +38,8 @@ int intel_lpss_resume(struct device *dev);
> > #ifdef CONFIG_PM_SLEEP
> > #define INTEL_LPSS_SLEEP_PM_OPS \
> > .prepare = intel_lpss_prepare, \
> > - .suspend = intel_lpss_suspend, \
> > - .resume = intel_lpss_resume, \
> > + .suspend_late = intel_lpss_suspend, \
> > + .resume_early = intel_lpss_resume, \
> > .freeze = intel_lpss_suspend, \
> > .thaw = intel_lpss_resume, \
> > .poweroff = intel_lpss_suspend, \
>
> Of course, freeze/thaw, poweroff/restore need to be moved to the
> late/early stages too.
Right.
> I'll add this patch to the series and resend, then.
Thanks!
> BTW, is the parent of intel-lpss in this case a PCI device or
> something else?
It is the PCI host bridge:
00:00.0 Host bridge: Intel Corporation Skylake Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 07)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
The following are the two LPSS I2C devices where intel-lpss binds to:
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-H Serial IO I2C Controller #0 (rev 31)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-H Serial IO I2C Controller #1 (rev 31)
next prev parent reply other threads:[~2017-09-05 15:41 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-03 23:05 [RFT][PATCH 0/2] i2c: designware: Runtime PM aware system sleep handling Rafael J. Wysocki
2017-09-03 23:08 ` [RFT][PATCH 1/2] i2c: designware: Clean up PM handling in dw_i2c_plat_probe() Rafael J. Wysocki
2017-09-05 14:40 ` Jarkko Nikula
2017-09-05 14:41 ` Rafael J. Wysocki
2017-09-03 23:14 ` [RFT][PATCH 2/2] PM / i2c: designware: Clean up system sleep handling without ACPI Rafael J. Wysocki
2017-09-04 10:01 ` [RFT][PATCH v2 " Rafael J. Wysocki
2017-09-05 14:45 ` Mika Westerberg
2017-09-05 14:46 ` Rafael J. Wysocki
2017-09-05 14:58 ` Mika Westerberg
2017-09-05 14:55 ` Rafael J. Wysocki
2017-09-05 15:02 ` Rafael J. Wysocki
2017-09-05 15:07 ` Mika Westerberg
2017-09-05 15:04 ` Rafael J. Wysocki
2017-09-05 15:24 ` Mika Westerberg
2017-09-05 15:32 ` Rafael J. Wysocki
2017-09-05 15:41 ` Mika Westerberg [this message]
2017-09-05 21:00 ` Johannes Stezenbach
2017-09-05 21:22 ` Rafael J. Wysocki
2017-09-04 10:07 ` [RFT][PATCH " Rafael J. Wysocki
2017-09-05 15:46 ` Andy Shevchenko
2017-09-05 23:41 ` [RFT][PATCH v3 0/3] i2c: designware: Runtime PM aware system sleep handling Rafael J. Wysocki
2017-09-05 23:43 ` [RFT][PATCH v3 1/3] i2c: designware: Clean up PM handling in dw_i2c_plat_probe() Rafael J. Wysocki
2017-09-05 23:46 ` [RFT][PATCH v3 2/3] PM / mfd: intel-lpss: Push system sleep callbacks to late/early stages Rafael J. Wysocki
2017-09-05 23:48 ` [RFT][PATCH v3 3/3] PM / i2c: designware: Clean up system sleep handling Rafael J. Wysocki
2017-09-06 9:16 ` [RFT][PATCH v3 0/3] i2c: designware: Runtime PM aware " Johannes Stezenbach
2017-09-06 9:55 ` Rafael J. Wysocki
2017-09-06 19:59 ` Johannes Stezenbach
2017-09-06 21:37 ` Rafael J. Wysocki
2017-09-08 7:34 ` Johannes Stezenbach
2017-09-06 11:06 ` Mika Westerberg
2017-09-06 11:14 ` Rafael J. Wysocki
2017-09-06 13:46 ` Jarkko Nikula
2017-09-24 23:13 ` [PATCH v4 " Rafael J. Wysocki
2017-09-24 23:17 ` [PATCH v4 1/3] PM: i2c-designware-platdrv: Clean up PM handling in probe Rafael J. Wysocki
2017-09-25 19:12 ` Ulf Hansson
2017-09-25 20:45 ` Rafael J. Wysocki
2017-09-25 21:10 ` [Update][PATCH v5 " Rafael J. Wysocki
2017-10-05 11:00 ` Wolfram Sang
2017-09-24 23:20 ` [PATCH v4 2/3] PM / mfd: intel-lpss: Push system sleep callbacks to late/early stages Rafael J. Wysocki
2017-09-25 7:28 ` Wolfram Sang
2017-09-25 12:50 ` Rafael J. Wysocki
2017-09-25 14:24 ` Wolfram Sang
2017-10-02 23:58 ` Rafael J. Wysocki
2017-09-28 19:19 ` Lee Jones
2017-09-28 20:51 ` Rafael J. Wysocki
2017-10-05 11:00 ` Wolfram Sang
2017-09-24 23:30 ` [PATCH v4 3/3] PM: i2c-designware-platdrv: Suspend/resume at the " Rafael J. Wysocki
2017-10-05 11:00 ` Wolfram Sang
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=20170905154147.GC2477@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=guodong.xu@linaro.org \
--cc=haojian.zhuang@linaro.org \
--cc=jarkko.nikula@linux.intel.com \
--cc=john.stultz@linaro.org \
--cc=js@sig21.net \
--cc=jszhang@marvell.com \
--cc=khilman@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=sumit.semwal@linaro.org \
--cc=ulf.hansson@linaro.org \
--cc=wsa@the-dreams.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.