Messages in this thread | | | Subject | Re: [PATCH V2] acpi:apd:add AMD ACPI2Platform device support for x86 system. | From | Ken Xue <> | Date | Tue, 3 Feb 2015 09:04:55 +0800 |
| |
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.
| |