All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Thierry Reding <thierry.reding@gmail.com>,
	Linux PWM List <linux-pwm@vger.kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 2/2] pwm: lpss: Check PWM powerstate after resume on Cherry Trail devices
Date: Thu, 11 Oct 2018 16:00:56 +0200	[thread overview]
Message-ID: <CAJZ5v0h88dss3eA2pbip6BGnjRbTpYmETxUPJ_+kbjcwg6v8SQ@mail.gmail.com> (raw)
In-Reply-To: <bbd2a664-71cf-10aa-253d-944059b58c0f@redhat.com>

On Wed, Oct 10, 2018 at 1:14 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi,
>
> On 06-10-18 16:16, Andy Shevchenko wrote:
> > On Sat, Oct 06, 2018 at 10:55:41AM +0200, Hans de Goede wrote:
> >> On 03-10-18 11:22, Rafael J. Wysocki wrote:
> >>> On Monday, September 24, 2018 11:40:14 AM CEST Hans de Goede wrote:
> >
> >>> Also, why don't you use acpi_device_get_power() instead of evaluating
> >>> _PSC directly?  It should make no difference if there are no power
> >>> resources, should it?
> >
> >> 2) acpi_device_get_power() is not exported to modules
> >
> > Do we have any side effects if we just export it?
> > I would think exporting is better than open coding.
>
> acpi_device_get_power() does a lot more then just call the _PSC
> method, while as explained we really just want the _PSC method
> as that checks the actual D3 bit which we are interested in.
>
> But as Rafael mentioned if the DSDT does not define power-resources
> (which in the 3 DSDTs I just checked it doesn't for the PWM node) then
> acpi_device_get_power() is equivalent.
>
> So I guess I could change this, but I would prefer to stick with
> the direct _PSC call.

And I would prefer acpi_device_get_power() to be used as long as it
works in this case.

I really don't want every driver to evaluate ACPI methods directly at will.

Thanks,
Rafael

  parent reply	other threads:[~2018-10-11 14:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 17:30 [PATCH 1/2] pwm: lpss: Move struct pwm_lpss_chip definition to the header file Hans de Goede
2018-09-11 17:30 ` [PATCH 2/2] pwm: lpss: Check PWM powerstate after resume on Cherry Trail devices Hans de Goede
2018-09-24  9:02   ` Andy Shevchenko
2018-09-24  9:10     ` Hans de Goede
2018-09-24  9:18       ` Andy Shevchenko
2018-09-24  9:40         ` Hans de Goede
2018-10-03  9:22           ` Rafael J. Wysocki
2018-10-06  8:55             ` Hans de Goede
2018-10-06 14:16               ` Andy Shevchenko
2018-10-10 11:14                 ` Hans de Goede
2018-10-11 12:07                   ` Andy Shevchenko
2018-10-11 14:00                   ` Rafael J. Wysocki [this message]
2018-10-11 14:11                     ` Hans de Goede

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=CAJZ5v0h88dss3eA2pbip6BGnjRbTpYmETxUPJ_+kbjcwg6v8SQ@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=thierry.reding@gmail.com \
    /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.