From: Ken Xue <Ken.Xue@amd.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: <rjw@rjwysocki.net>, <linux-acpi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <andy.shevchenko@gmail.com>
Subject: Re: [PATCH 3/3] acpi:lpss:Refine lpss codes to fit acpi soc.
Date: Wed, 17 Dec 2014 17:27:33 +0800 [thread overview]
Message-ID: <1418808453.2582.36.camel@kxue-X58A-UD3R> (raw)
In-Reply-To: <20141216101626.GW1300@lahna.fi.intel.com>
On Tue, 2014-12-16 at 12:16 +0200, Mika Westerberg wrote:
> On Thu, Dec 11, 2014 at 11:05:51AM +0800, Ken Xue wrote:
>
> This is missing changelog.
>
> > Signed-off-by: Ken Xue <Ken.Xue@amd.com>
>
> ...
>
[Ken]got it.
> > +static int lpss_common_setup(struct acpi_soc_dev_private_data *pdata)
> > {
> > - struct lpss_device_desc *dev_desc;
> > - struct lpss_private_data *pdata;
> > - struct resource_list_entry *rentry;
> > - struct list_head resource_list;
> > - struct platform_device *pdev;
> > - int ret;
> > -
> > - dev_desc = (struct lpss_device_desc *)id->driver_data;
> > - if (!dev_desc) {
> > - pdev = acpi_create_platform_device(adev);
> > - return IS_ERR_OR_NULL(pdev) ? PTR_ERR(pdev) : 1;
> > - }
> > - pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
> > - if (!pdata)
> > - return -ENOMEM;
> > -
> > - INIT_LIST_HEAD(&resource_list);
> > - ret = acpi_dev_get_resources(adev, &resource_list, is_memory, NULL);
> > - if (ret < 0)
> > - goto err_out;
> > -
> > - list_for_each_entry(rentry, &resource_list, node)
> > - if (resource_type(&rentry->res) == IORESOURCE_MEM) {
> > - if (dev_desc->prv_size_override)
> > - pdata->mmio_size = dev_desc->prv_size_override;
> > - else
> > - pdata->mmio_size = resource_size(&rentry->res);
> > - pdata->mmio_base = ioremap(rentry->res.start,
> > - pdata->mmio_size);
> > - break;
> > - }
> > -
> > - acpi_dev_free_resource_list(&resource_list);
> > + int ret = 0;
> > + struct acpi_soc_dev_desc *dev_desc;
>
>
> Please order these so that the longest line is on top. E.g
>
[ken]got it.
> struct acpi_soc_dev_desc *dev_desc;
> int ret = 0;
>
> Ditto for other similar places.
>
> >
> > - pdata->dev_desc = dev_desc;
> > + dev_desc = pdata->dev_desc;
> >
> > - if (dev_desc->setup)
> > - dev_desc->setup(pdata);
> > + if (dev_desc->flags & LPSS_CLK)
> > + ret = register_device_clock(pdata->adev, pdata);
> >
> > - if (dev_desc->flags & LPSS_CLK) {
> > - ret = register_device_clock(adev, pdata);
> > - if (ret) {
> > - /* Skip the device, but continue the namespace scan. */
> > - ret = 0;
> > - goto err_out;
> > - }
> > - }
> > + return ret;
> > +}
>
> ...
>
> > void __init acpi_lpss_init(void)
> > {
> > if (!lpt_clk_init()) {
> > - bus_register_notifier(&platform_bus_type, &acpi_lpss_nb);
> > - acpi_scan_add_handler(&lpss_handler);
> > + a_soc.ids = acpi_lpss_device_ids;
> > + a_soc.attr_group = &lpss_attr_group;
> > + a_soc.pm_domain = &acpi_lpss_pm_domain;
>
> If AMD stuff is not needing PM domain or LTR, I suggest that you leave
> both to be part of LPSS and not move them to acpi_soc.
>
[Ken]there is no strong reason i can see to remove it. AMD may be also
has similar good feature in the future. and intel also can modify acpi
soc as you need, if it really can not meet your design.
> > + register_acpi_soc(&a_soc, true);
> ^^^^ This needs to be false
>
> > }
> > }
next prev parent reply other threads:[~2014-12-17 9:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 3:05 Ken Xue
2014-12-16 10:16 ` Mika Westerberg
2014-12-17 9:27 ` Ken Xue [this message]
2014-12-16 10:27 ` Andy Shevchenko
2014-12-17 9:26 ` Ken Xue
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=1418808453.2582.36.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®