alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Hanjun Guo <hanjun.guo@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Hanjun Guo <guohanjun@huawei.com>
Cc: Lukas Wunner <lukas@wunner.de>,
	"Moore, Robert" <robert.moore@intel.com>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"devel@acpica.org" <devel@acpica.org>,
	"platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>,
	Darren Hart <dvhart@infradead.org>,
	Corentin Chary <corentin.chary@gmail.com>,
	"Lee, Chun-Yi" <jlee@suse.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Takashi Iwai <tiwai@suse.de>, Hui Wang <hui.wang@canonical.com>,
	Mark Brown <broonie@kernel.org>, "Zheng, Lv" <lv.zheng@intel.com>,
	David Box <david.e.box@linux.intel.com>
Subject: Re: [PATCH 1/5] ACPICA: Add acpi_dev_present
Date: Tue, 24 Nov 2015 22:54:35 +0800	[thread overview]
Message-ID: <56547A2B.8030401@linaro.org> (raw)
In-Reply-To: <2460979.tXaWt9xg5Q@vostro.rjw.lan>

On 11/24/2015 10:22 PM, Rafael J. Wysocki wrote:
> On Tuesday, November 24, 2015 12:40:51 PM Hanjun Guo wrote:
>> On 2015/11/24 7:32, Lukas Wunner wrote:
>>> Hi Robert,
>>>
>>> On Mon, Nov 23, 2015 at 10:22:27PM +0000, Moore, Robert wrote:
>>>>>> acpi_dev_present
>>>> Do you really want to be walking the ACPICA namespace for every call?
>>> That's what the drivers currently do. Typically this is called only once
>>> on initialization by the driver's ->probe callback.
>>>
>>> What did you have in mind instead, cache the result? Or store the HIDs
>>> in the namespace in a hash that can be queried faster?
>>
>> Will those drivers be loaded before the acpi namespace is scanned? if not, I think
>> those IDs already cached, in acpi_init_device_object(),
>>
>> INIT_LIST_HEAD(&device->pnp.ids);
>> ...
>> acpi_set_pnp_ids(handle, &device->pnp, type);
>>
>> please see API acpi_device_hid(), so I think you can introduce a API with
>> acpi_device and HID passed as arguments in scan.c
>
> I'd prefer that to go to utils.c to be honest, even if the namespace needs to
> be walked.

I agree, utils.c is the better place to go.

Thanks
Hanjun

      reply	other threads:[~2015-11-24 14:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 14:34 [PATCH 0/5] Add acpi_dev_present Lukas Wunner
2015-11-23 14:34 ` [PATCH 5/5] ASoC: Intel: Use acpi_dev_present Lukas Wunner
2015-11-23 14:48   ` Mark Brown
2015-11-23 22:37     ` Rafael J. Wysocki
2015-11-23 14:34 ` [PATCH 4/5] ALSA: hda - " Lukas Wunner
2015-11-24  1:51   ` [alsa-devel] " Hui Wang
2015-11-23 14:34 ` [PATCH 1/5] ACPICA: Add acpi_dev_present Lukas Wunner
2015-11-23 22:34   ` Rafael J. Wysocki
2015-11-23 22:22     ` Moore, Robert
2015-11-23 23:32       ` Lukas Wunner
2015-11-24  4:40         ` Hanjun Guo
2015-11-24 14:15           ` Moore, Robert
2015-11-24 14:22           ` Rafael J. Wysocki
2015-11-24 14:54             ` Hanjun Guo [this message]

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=56547A2B.8030401@linaro.org \
    --to=hanjun.guo@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=corentin.chary@gmail.com \
    --cc=david.e.box@linux.intel.com \
    --cc=devel@acpica.org \
    --cc=dvhart@infradead.org \
    --cc=guohanjun@huawei.com \
    --cc=hui.wang@canonical.com \
    --cc=jlee@suse.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=lv.zheng@intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --cc=tiwai@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).