mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ken Xue <Ken.Xue@amd.com>
To: "mika.westerberg@linux.intel.com" <mika.westerberg@linux.intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2] acpi:apd:add AMD ACPI2Platform device support for x86 system.
Date: Tue, 3 Feb 2015 09:04:55 +0800	[thread overview]
Message-ID: <1422925495.2528.12.camel@kxue-X58A-UD3R> (raw)
In-Reply-To: <20150202130356.GS22740@lahna.fi.intel.com>

On Mon, 2015-02-02 at 15:03 +0200, mika.westerberg@linux.intel.com
wrote:
> On Mon, Feb 02, 2015 at 05:50:52PM +0800, Ken Xue wrote:
> > >From b9654ecbfaebde00aee746a024eec9fe8de24b97 Mon Sep 17 00:00:00 2001
> > From: Ken Xue <Ken.Xue@amd.com>
> > Date: Mon, 2 Feb 2015 17:32:24 +0800
> > Subject: [PATCH] This new feature is to interpret AMD specific ACPI device to
> >  platform device such as I2C, UART found on AMD CZ and later chipsets. It
> >  based on example INTEL LPSS. Now, it can support AMD I2C & UART.
> 
> Looks good to me. There are few smallish issues still, see below.
> 
...

> > +	switch (action) {
> > +	case BUS_NOTIFY_ADD_DEVICE:
> > +		if (pdata->dev_desc->flags & ACPI_APD_PM) {
> > +			if (pdata->dev_desc->flags & ACPI_APD_PM_ON)
> > +				ret = dev_pm_domain_attach(&pdev->dev, true);
> > +			else
> > +				ret = dev_pm_domain_attach(&pdev->dev, false);
> 
> How about:
> 
> 	power_on = !!(pdata->dev_desc->flags & ACPI_APD_PM_ON)
> 	ret = dev_pm_domain_attach(&pdev->dev, power_on);
> 
> ?
good 

> 
> Furthermore I think this is not needed at all. If you check
> platform_drv_probe() it calls dev_pm_domain_attach() already.
> 
as you said, platform_drv_probe calls dev_pm_domain_attach(). but
platform_drv_probe just is a default probe routine. Not all platform
device drivers use this probe routine. so, codes here may be still
necessary.




  reply	other threads:[~2015-02-03  1:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-02  9:50 Ken Xue
2015-02-02 13:03 ` mika.westerberg
2015-02-03  1:04   ` Ken Xue [this message]
2015-02-03  9:53     ` mika.westerberg
2015-02-03  9:55       ` Ken Xue
2015-02-03 10:15         ` mika.westerberg

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=1422925495.2528.12.camel@kxue-X58A-UD3R \
    --to=ken.xue@amd.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    /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®