From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
martyn.welch@collabora.co.uk,
Ulf Hansson <ulf.hansson@linaro.org>,
Daniel Kurtz <djkurtz@chromium.org>,
David Airlie <airlied@linux.ie>,
Tomas Winkler <tomas.winkler@intel.com>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dri-devel@lists.freedesktop.org,
Russell King <linux@arm.linux.org.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kevin Hilman <khilman@kernel.org>,
Tony Lindgren <tony@atomide.com>, Len Brown <lenb@kernel.org>,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
Pavel Machek <pavel@ucw.cz>,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v12 2/4] PM / Domains: add setter for dev.pm_domain
Date: Fri, 29 Jan 2016 17:51:49 +0200 [thread overview]
Message-ID: <CAHp75VdWPUZ8F5rsGn3M1e5Pgpcg1CErBej9PE_3+ZPke5CDFA@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VdZMtm0_USuX2tiFO+O2QK8Wa+A9FDKZ=JqqGwr0SWi0g@mail.gmail.com>
On Fri, Jan 29, 2016 at 5:38 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Thu, Jan 7, 2016 at 5:46 PM, Tomeu Vizoso <tomeu.vizoso@collabora.com> wrote:
>> Adds a function that sets the pointer to dev_pm_domain in struct device
>> and that warns if the device has already finished probing. The reason
>> why we want to enforce that is because in the general case that can
>> cause problems and also that we can simplify code quite a bit if we can
>> always assume that.
>>
>> This patch also changes all current code that directly sets the
>> dev.pm_domain pointer.
>
>
>> --- a/drivers/acpi/acpi_lpss.c
>> +++ b/drivers/acpi/acpi_lpss.c
>
>> @@ -875,13 +876,14 @@ static int acpi_lpss_platform_notify(struct notifier_block *nb,
>>
>> switch (action) {
>> case BUS_NOTIFY_BIND_DRIVER:
>> - pdev->dev.pm_domain = &acpi_lpss_pm_domain;
>> + dev_pm_domain_set(&pdev->dev, &acpi_lpss_pm_domain);
>> break;
>> case BUS_NOTIFY_DRIVER_NOT_BOUND:
>> case BUS_NOTIFY_UNBOUND_DRIVER:
>> pdev->dev.pm_domain = NULL;
>
> Missed?
>
>> break;
>> case BUS_NOTIFY_ADD_DEVICE:
>> + dev_pm_domain_set(&pdev->dev, &acpi_lpss_pm_domain);
>> if (pdata->dev_desc->flags & LPSS_LTR)
>> return sysfs_create_group(&pdev->dev.kobj,
>> &lpss_attr_group);
>> @@ -889,6 +891,7 @@ static int acpi_lpss_platform_notify(struct notifier_block *nb,
>> case BUS_NOTIFY_DEL_DEVICE:
>> if (pdata->dev_desc->flags & LPSS_LTR)
>> sysfs_remove_group(&pdev->dev.kobj, &lpss_attr_group);
>> + dev_pm_domain_set(&pdev->dev, NULL);
>> break;
>> default:
>> break;
>
> This looks wrong. I didn't test yet, but I have concerns here. Why did
> you add those calls?
Okay, for first glance it seems working on Intel Braswell. But can
yoyu point me out what was going on before this patch?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2016-01-29 15:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 15:46 [PATCH v12 0/4] Allow USB devices to remain runtime-suspended when sleeping Tomeu Vizoso
2016-01-07 15:46 ` [PATCH v12 1/4] device core: add device_is_bound() Tomeu Vizoso
2016-01-07 15:46 ` [PATCH v12 2/4] PM / Domains: add setter for dev.pm_domain Tomeu Vizoso
2016-01-29 15:38 ` Andy Shevchenko
2016-01-29 15:51 ` Andy Shevchenko [this message]
2016-01-29 16:35 ` Andy Shevchenko
2016-01-29 21:35 ` Rafael J. Wysocki
2016-02-08 21:44 ` Valdis.Kletnieks
2016-02-08 21:50 ` Rafael J. Wysocki
2016-02-09 20:14 ` Valdis.Kletnieks
2016-01-07 15:46 ` [PATCH v12 3/4] PM / sleep: Go direct_complete if driver has no callbacks Tomeu Vizoso
2016-01-07 15:46 ` [PATCH v12 4/4] USB / PM: Allow USB devices to remain runtime-suspended when sleeping Tomeu Vizoso
2016-01-08 23:33 ` [PATCH v12 0/4] " 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=CAHp75VdWPUZ8F5rsGn3M1e5Pgpcg1CErBej9PE_3+ZPke5CDFA@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=airlied@linux.ie \
--cc=djkurtz@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=martyn.welch@collabora.co.uk \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=stern@rowland.harvard.edu \
--cc=tomas.winkler@intel.com \
--cc=tomeu.vizoso@collabora.com \
--cc=tony@atomide.com \
--cc=ulf.hansson@linaro.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
all inboxes | Powered by JetHome®