From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Prakash, Prashanth" Subject: Re: [PATCH 1/3] ACPI: move ACPI_SYSTEM_HID to acpi_drivers.h Date: Fri, 18 Mar 2016 09:33:38 -0600 Message-ID: <56EC1FD2.8010801@codeaurora.org> References: <1458157022-18633-1-git-send-email-pprakash@codeaurora.org> <1458157022-18633-2-git-send-email-pprakash@codeaurora.org> <56EAE10B.8070404@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:48109 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751410AbcCRPdl (ORCPT ); Fri, 18 Mar 2016 11:33:41 -0400 In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Rafael J. Wysocki" Cc: ACPI Devel Maling List , harba@codeaurora.org, "Rafael J. Wysocki" , "Jonathan (Zhixiong) Zhang" Than On 3/17/2016 3:54 PM, Rafael J. Wysocki wrote: > On Thu, Mar 17, 2016 at 5:53 PM, Prakash, Prashanth > wrote: >> Hi Rafael, >> >> On 3/16/2016 7:50 PM, Rafael J. Wysocki wrote: >>> #include "internal.h" >>> @@ -22,7 +24,6 @@ ACPI_MODULE_NAME("scan"); >>> extern struct acpi_device *acpi_root; >>> >>> #define ACPI_BUS_CLASS "system_bus" >>> -#define ACPI_BUS_HID "LNXSYBUS" >>> No. >>> >>> This is not a valid device ID and should never be used as such. >> Section 5.6.6 in ACPI 6.1 is defining the notification value for the graceful >> shutdown request as a ACPI device specific value(0x81) and it is targeting >> the system bus(\_SB), so we took the current approach of creating a sybus >> driver to handle the notifications targeting the system bus. >> >> Let me go through the code again and see if we can avoid using the >> ACPI_BUS_HID. > You can. > >> In the meantime, if you have any specific thoughts on >> how this should be handled, please let us know. > Your goal is relatively simple. You want to register a notify handler > for the \_SB object. You don't need a driver for that, because the > \_SB object is always present, so you don't need to enumerate it or > wait for it to show up etc. > > I'd just scan the namespace 1 level below the root and install the > handler for the object with the matching name (not a fake device ID). Thanks Rafael! I will update the patch using the above approach. -Prashanth > Thanks, > Rafael > >