From: Thierry Reding <thierry.reding@gmail.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Hans de Goede <hdegoede@redhat.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Len Brown <lenb@kernel.org>,
linux-pwm@vger.kernel.org, linux-acpi@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2 1/2] pwm: lpss: platform: Save/restore the ctrl register over a suspend/resume
Date: Mon, 14 May 2018 13:50:32 +0200 [thread overview]
Message-ID: <20180514115032.GF18312@ulmo> (raw)
In-Reply-To: <2943907.WSHDcS9sfS@aspire.rjw.lan>
[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]
On Thu, May 10, 2018 at 05:25:10PM +0200, Rafael J. Wysocki wrote:
> On Thursday, April 26, 2018 2:10:23 PM CEST Hans de Goede wrote:
> > On some devices the contents of the ctrl register get lost over a
> > suspend/resume and the PWM comes back up disabled after the resume.
> >
> > This is seen on some Bay Trail devices with the PWM in ACPI enumerated
> > mode, so it shows up as a platform device instead of a PCI device.
> >
> > If we still think it is enabled and then try to change the duty-cycle
> > after this, we end up with a "PWM_SW_UPDATE was not cleared" error and
> > the PWM is stuck in that state from then on.
> >
> > This commit adds suspend and resume pm callbacks to the pwm-lpss-platform
> > code, which save/restore the ctrl register over a suspend/resume, fixing
> > this.
> >
> > Note that:
> >
> > 1) There is no need to do this over a runtime suspend, since we
> > only runtime suspend when disabled and then we properly set the enable
> > bit and reprogram the timings when we re-enable the PWM.
> >
> > 2) This may be happening on more systems then we realize, but has been
> > covered up sofar by a bug in the acpi-lpss.c code which was save/restoring
> > the regular device registers instead of the lpss private registers due to
> > lpss_device_desc.prv_offset not being set. This is fixed by a later patch
> > in this series.
> >
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Andy, Thierry, any comments or concerns regarding this series?
Hans said in the cover letter of the first version of this series that
he preferred to merge both patches through the PWM tree because of the
dependency. So I'm waiting for an Acked-by from you on the ACPI bits.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-05-14 11:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 12:10 [PATCH v2 1/2] pwm: lpss: platform: Save/restore the ctrl register over a suspend/resume Hans de Goede
2018-04-26 12:10 ` [PATCH v2 2/2] ACPI / LPSS: Add missing prv_offset setting for byt/cht PWM devices Hans de Goede
2018-05-10 15:25 ` [PATCH v2 1/2] pwm: lpss: platform: Save/restore the ctrl register over a suspend/resume Rafael J. Wysocki
2018-05-14 11:10 ` Andy Shevchenko
2018-05-14 11:50 ` Thierry Reding [this message]
2018-05-14 14:08 ` Hans de Goede
2018-05-14 20:36 ` Rafael J. Wysocki
2018-06-01 13:54 ` Hans de Goede
2018-06-06 8:03 ` Thierry Reding
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=20180514115032.GF18312@ulmo \
--to=thierry.reding@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=stable@vger.kernel.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).