[Devel] [PATCH 1/5] ACPICA: Add acpi_dev_present
hanjun.guo at linaro.org
Tue Nov 24 06:54:43 PST 2015
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:
>>>> 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(),
>> 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.
More information about the Devel