From: Mika Westerberg <mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: "Rafael J. Wysocki" <rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Aaron Lu <aaron.lu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Lv Zheng <lv.zheng-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Kevin Hilman <khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Sylwester Nawrocki
<s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3] i2c: enable runtime PM for I2C adapter devices enumerated from ACPI
Date: Mon, 30 Sep 2013 21:59:07 +0300 [thread overview]
Message-ID: <20130930185907.GS28875@intel.com> (raw)
In-Reply-To: <34540715.4ajYlpge4D-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
On Mon, Sep 30, 2013 at 07:20:59PM +0200, Rafael J. Wysocki wrote:
> > +static void acpi_i2c_device_pm_get(struct i2c_client *client)
> > +{
> > + struct i2c_adapter *adap = client->adapter;
> > +
> > + /* Make sure the adapter is active */
> > + if (ACPI_HANDLE(adap->dev.parent))
> > + pm_runtime_get_sync(&adap->dev);
> > + if (ACPI_HANDLE(&client->dev))
> > + acpi_dev_pm_attach(&client->dev, true);
>
> It would be sufficient to do
>
> if (ACPI_HANDLE(&client->dev)) {
> pm_runtime_get_sync(&adap->dev);
> acpi_dev_pm_attach(&client->dev, true);
> }
>
> here (and below), because I don't think the client with an ACPI handle and the
> parent without one is extremely unlikely (to the point of non-existence
> actually ;-)). And even if something like that happens, then we only enable
> runtime PM for the adapter if the parent has an ACPI handle, so it still should
> be OK.
OK, I'll change that in the next revision.
> Apart from this the patch looks good to me.
Thanks!
WARNING: multiple messages have this Message-ID (diff)
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: linux-i2c@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>,
Aaron Lu <aaron.lu@intel.com>, Lv Zheng <lv.zheng@intel.com>,
Mark Brown <broonie@kernel.org>,
Kevin Hilman <khilman@linaro.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v3] i2c: enable runtime PM for I2C adapter devices enumerated from ACPI
Date: Mon, 30 Sep 2013 21:59:07 +0300 [thread overview]
Message-ID: <20130930185907.GS28875@intel.com> (raw)
In-Reply-To: <34540715.4ajYlpge4D@vostro.rjw.lan>
On Mon, Sep 30, 2013 at 07:20:59PM +0200, Rafael J. Wysocki wrote:
> > +static void acpi_i2c_device_pm_get(struct i2c_client *client)
> > +{
> > + struct i2c_adapter *adap = client->adapter;
> > +
> > + /* Make sure the adapter is active */
> > + if (ACPI_HANDLE(adap->dev.parent))
> > + pm_runtime_get_sync(&adap->dev);
> > + if (ACPI_HANDLE(&client->dev))
> > + acpi_dev_pm_attach(&client->dev, true);
>
> It would be sufficient to do
>
> if (ACPI_HANDLE(&client->dev)) {
> pm_runtime_get_sync(&adap->dev);
> acpi_dev_pm_attach(&client->dev, true);
> }
>
> here (and below), because I don't think the client with an ACPI handle and the
> parent without one is extremely unlikely (to the point of non-existence
> actually ;-)). And even if something like that happens, then we only enable
> runtime PM for the adapter if the parent has an ACPI handle, so it still should
> be OK.
OK, I'll change that in the next revision.
> Apart from this the patch looks good to me.
Thanks!
next prev parent reply other threads:[~2013-09-30 18:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 14:43 [PATCH v3] runtime PM support for I2C adapter devices Mika Westerberg
2013-09-30 14:43 ` Mika Westerberg
2013-09-30 14:43 ` Mika Westerberg
[not found] ` <1380552228-23329-1-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-09-30 14:43 ` [PATCH v3] i2c: enable runtime PM for I2C adapter devices enumerated from ACPI Mika Westerberg
2013-09-30 14:43 ` Mika Westerberg
2013-09-30 14:43 ` Mika Westerberg
2013-09-30 17:20 ` Rafael J. Wysocki
2013-09-30 17:20 ` Rafael J. Wysocki
[not found] ` <34540715.4ajYlpge4D-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2013-09-30 17:23 ` Rafael J. Wysocki
2013-09-30 17:23 ` Rafael J. Wysocki
2013-09-30 17:23 ` Rafael J. Wysocki
2013-09-30 18:59 ` Mika Westerberg [this message]
2013-09-30 18:59 ` Mika Westerberg
2013-10-01 9:52 ` Mika Westerberg
[not found] ` <1380552228-23329-2-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-01 13:09 ` [PATCH v4] " Mika Westerberg
2013-10-01 13:09 ` Mika Westerberg
2013-10-01 13:09 ` Mika Westerberg
2013-10-01 16:24 ` Rafael J. Wysocki
2013-10-01 16:24 ` Rafael J. Wysocki
[not found] ` <1380632982-10709-1-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-05 8:09 ` Mika Westerberg
2013-10-05 8:09 ` Mika Westerberg
[not found] ` <20131005080901.GQ28875-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-10-05 10:31 ` Mark Brown
2013-10-05 10:31 ` Mark Brown
2013-10-05 10:31 ` Mark Brown
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=20130930185907.GS28875@intel.com \
--to=mika.westerberg-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=aaron.lu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lv.zheng-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
--cc=s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.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 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.