lkml.org 
[lkml]   [2015]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2] acpi:apd:add AMD ACPI2Platform device support for x86 system.
From
Date
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.





\
 
 \ /
  Last update: 2015-02-03 03:21    [W:0.055 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site