From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755141AbcBPMeO (ORCPT ); Tue, 16 Feb 2016 07:34:14 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:33835 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755057AbcBPMeM (ORCPT ); Tue, 16 Feb 2016 07:34:12 -0500 Reply-To: Subject: Re: [RFC PATCH] GPIO/ACPI: DesignWare: Add GPIO-signaled ACPI events support for power button References: <1454653542-122055-1-git-send-email-qiujiang@huawei.com> To: Linus Walleij , Mika Westerberg CC: Alexandre Courbot , "linux-gpio@vger.kernel.org" , ACPI Devel Maling List , "linux-kernel@vger.kernel.org" , , , From: Jiang Qiu Message-ID: <56C316E8.4090002@huawei.com> Date: Tue, 16 Feb 2016 20:32:40 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.74.160.152] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.56C316F8.026D,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 6ed65654ba4b27467b2546b9b2f54945 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2016/2/16 2:25, Linus Walleij 写道: > Mika can you help out looking at this patch. Tell me if you need a copy > of the whole patch, I'm not smart with ACPI. > > On Fri, Feb 5, 2016 at 7:25 AM, qiujiang wrote: > >> This patch modifies the DesignWare GPIO controller driver to >> support the GPIO-signaled ACPI Events. This is used for power >> button function on ARM server. >> >> To make it work, the _AEI and _EVT object must be defined in >> the corresponding GPIO driver's dsdt table in UEFI. At the same >> time, ACPI daemon component is also necessary. >> >> Signed-off-by: qiujiang > > (...) >> --- a/drivers/gpio/gpio-dwapb.c >> +++ b/drivers/gpio/gpio-dwapb.c >> @@ -23,6 +23,11 @@ >> #include >> #include >> #include >> +#include >> +#include > > You should only need Here, I don't understand well. I used driver.h instead acpi.h and gpio.h, but it came to compile failed. > >> +#include "gpiolib.h" > > I guess this is for some acpi_gpiochip* functions that ACPI GPIO > drivers need like this: > Yes, this is for function the following acpi_gpiochip* function. These functions were declared in the gpiolib.h but gpiolib-acpi.h. >> + /* Add GPIO-signaled ACPI event support */ >> + if (pp->irq) >> + acpi_gpiochip_request_interrupts(&(port->bgc.gc)); > > Hm, maybe these should be in "gpiolib-acpi.h" or so. > > Overall the patch looks sane to me, but I need some ACPI > person to tell. > > Yours, > Linus Walleij > > . >