linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-acpi@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Aaron Lu <aaron.lu@intel.com>, Lv Zheng <lv.zheng@intel.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] spi: attach/detach SPI device to the ACPI power domain
Date: Thu, 10 Oct 2013 09:12:56 +0300	[thread overview]
Message-ID: <20131010061256.GB3521@intel.com> (raw)
In-Reply-To: <20131009175528.GV21581@sirena.org.uk>

On Wed, Oct 09, 2013 at 06:55:28PM +0100, Mark Brown wrote:
> On Wed, Oct 09, 2013 at 05:04:21PM +0300, Mika Westerberg wrote:
> > If the SPI device is enumerated from ACPI namespace (it has an ACPI handle)
> > it might have ACPI methods that needs to be called in order to transition
> > the device to different power states (such as _PSx).
> 
> Acked-by: Mark Brown <broonie@linaro.org>

Thanks!

> > +	if (ACPI_HANDLE(&spi->dev))
> > +		acpi_dev_pm_attach(&spi->dev, true);
> 
> Though I do wonder if it wouldn't be sensible to push the if () here
> inside acpi_dev_pm_attach() and similarly for _detach().  Terribly
> trivial either way.

Actually, the check is already there in acpi_dev_pm_attach()/detach(). The
above code follows what Rafael did for platform bus previously. I think the
idea is to have visual hint that this is only for ACPI enumerated devices.

If preferred, I can drop the if() checks, though.

  reply	other threads:[~2013-10-10  6:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 14:04 [PATCH 0/3] ACPI power management support for I2C and SPI devices Mika Westerberg
2013-10-09 14:04 ` [PATCH 1/3] ACPI / PM: allow child devices to ignore parent power state Mika Westerberg
     [not found] ` <1381327461-10562-1-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-09 14:04   ` [PATCH 2/3] i2c: attach/detach I2C client device to the ACPI power domain Mika Westerberg
2013-10-10  8:09     ` Wolfram Sang
2013-10-10  8:26       ` Mika Westerberg
2013-10-09 14:04 ` [PATCH 3/3] spi: attach/detach SPI " Mika Westerberg
     [not found]   ` <1381327461-10562-4-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-09 17:55     ` Mark Brown
2013-10-10  6:12       ` Mika Westerberg [this message]
     [not found]         ` <20131010061256.GB3521-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-10-10  9:38           ` Mark Brown
2013-10-10 10:28 ` [PATCH v2 0/3] ACPI power management support for I2C and SPI devices Mika Westerberg
2013-10-10 10:28   ` [PATCH v2 1/3] ACPI / PM: allow child devices to ignore parent power state Mika Westerberg
2013-10-10 10:28   ` [PATCH v2 2/3] i2c: attach/detach I2C client device to the ACPI power domain Mika Westerberg
     [not found]   ` <1381400928-2689-1-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-10 10:28     ` [PATCH v2 3/3] spi: attach/detach SPI " Mika Westerberg
2013-10-10 13:02     ` [PATCH v2 0/3] ACPI power management support for I2C and SPI devices Rafael J. Wysocki

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=20131010061256.GB3521@intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=aaron.lu@intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=rjw@rjwysocki.net \
    --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 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).