From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Westerberg Subject: Re: [PATCH 4/4] ACPI / platform: Use struct acpi_scan_handler for creating devices Date: Tue, 29 Jan 2013 10:05:09 +0200 Message-ID: <20130129080509.GK2239@intel.com> References: <1873429.MS5RQDxTye@vostro.rjw.lan> <4311642.nDd2RCVeDc@vostro.rjw.lan> <1540645.4oLGJ3spZ3@vostro.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga09.intel.com ([134.134.136.24]:51140 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753759Ab3A2IBY (ORCPT ); Tue, 29 Jan 2013 03:01:24 -0500 Content-Disposition: inline In-Reply-To: <1540645.4oLGJ3spZ3@vostro.rjw.lan> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Rafael J. Wysocki" Cc: ACPI Devel Maling List , Greg Kroah-Hartman , Bjorn Helgaas , Matthew Garrett , Yinghai Lu , Jiang Liu , Toshi Kani , LKML On Mon, Jan 28, 2013 at 02:01:14PM +0100, Rafael J. Wysocki wrote: > +/* Flags for acpi_create_platform_device */ > +#define ACPI_PLATFORM_CLK BIT(0) > + > +/* > + * The following ACPI IDs are known to be suitable for representing as > + * platform devices. > + */ > +static const struct acpi_device_id acpi_platform_device_ids[] = { > + > + { "PNP0D40" }, > + > + /* Haswell LPSS devices */ > + { "INT33C0", ACPI_PLATFORM_CLK }, > + { "INT33C1", ACPI_PLATFORM_CLK }, > + { "INT33C2", ACPI_PLATFORM_CLK }, > + { "INT33C3", ACPI_PLATFORM_CLK }, > + { "INT33C4", ACPI_PLATFORM_CLK }, > + { "INT33C5", ACPI_PLATFORM_CLK }, > + { "INT33C6", ACPI_PLATFORM_CLK }, > + { "INT33C7", ACPI_PLATFORM_CLK }, > + > + { } > +}; Now that we have everything the platform support code needs in a single file, should we instead of setting flags and comparing strings like "INT33C" to find out are we running on Lynxpoint, pass function pointer that gets called when corresponding device gets created? Something like: { "INT33C0", lpt_clks_init }, ... Or do you think we need to keep the flags still? I can prepare a patch if this turns out to be sensible thing to do.