From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [Update][PATCH] ACPI / scan: Add a scan handler for PRP0001 Date: Sat, 25 Apr 2015 04:25:59 +0200 Message-ID: <39726896.AI3Qx9bJPO@vostro.rjw.lan> References: <3444888.xxxTREorHY@vostro.rjw.lan> <2014594.ptBLVGNNCY@vostro.rjw.lan> <20150424222100.GA2514@vmdeb7> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7Bit Return-path: Received: from v094114.home.net.pl ([79.96.170.134]:51504 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755798AbbDYCBQ (ORCPT ); Fri, 24 Apr 2015 22:01:16 -0400 In-Reply-To: <20150424222100.GA2514@vmdeb7> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Darren Hart Cc: ACPI Devel Maling List , Mika Westerberg , Zhang Rui , Linux Kernel Mailing List On Friday, April 24, 2015 03:21:00 PM Darren Hart wrote: > On Fri, Apr 24, 2015 at 02:15:22AM +0200, Rafael Wysocki wrote: > > From: Rafael J. Wysocki > > > > If the special PRP0001 device ID is present in the given device's list > > of ACPI/PNP IDs and the device has a valid "compatible" property in > > the _DSD, it should be enumerated using the default mechanism, > > unless some scan handlers match the IDs preceding PRP0001 in the > > device's list of ACPI/PNP IDs. In addition to that, no scan handlers > > matching the IDs following PRP0001 in that list should be attached > > to the device. > > > > To make that happen, define a scan handler that will match PRP0001 > > and trigger the default enumeration for the matching devices if the > > "compatible" property is present for them. > > > > Since that requires the check for platform_id and device->handler > > to be removed from acpi_default_enumeration(), move the fallback > > invocation of acpi_default_enumeration() to acpi_bus_attach() > > (after it's checked if there's a matching ACPI driver for the > > device), which is a better place to call it, and do the platform_id > > check in there too (device->handler is guaranteed to be unset at > > the point where the function is looking for a matching ACPI driver). > > > > Signed-off-by: Rafael J. Wysocki > > Acked-by: Darren Hart > > --- > > > > The change from the original patch is to change the scan handler > > behavior to make it return 1 also if the "compatible" property is > > not present, in which case the additional scan handlers should not > > trigger too *and* the default enumeration should not trigger either > > (as there's no ID to match to), which will allow things like > > auxiliary nodes (think GPIO buttons/LEDs etc) to be easily represented. > > > This should probably be spelled out in the commit message itself as it's a fairly > unique condition. I'm going to document that in Documentation/acpi/enumeration.txt anyway. > > Darren, I've tentatively added your Acked-by tag to this one, please > > let me know if that's not appropriate. > > Spent a bit more time on it this time, so: > > Reviewed-by: Darren Hart Thanks!