Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1334704 > unrolled thread

Re: [RFC PATCH] GPIO/ACPI: DesignWare: Add GPIO-signaled ACPI events support for power button

Started byLinus Walleij <linus.walleij@linaro.org>
First post2016-02-15 19:30 +0100
Last post2016-02-16 16:40 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC PATCH] GPIO/ACPI: DesignWare: Add GPIO-signaled ACPI events  support for power button Linus Walleij <linus.walleij@linaro.org> - 2016-02-15 19:30 +0100
    Re: [RFC PATCH] GPIO/ACPI: DesignWare: Add GPIO-signaled ACPI events  support for power button Jiang Qiu <qiujiang@huawei.com> - 2016-02-16 13:40 +0100
      Re: [RFC PATCH] GPIO/ACPI: DesignWare: Add GPIO-signaled ACPI events  support for power button Linus Walleij <linus.walleij@linaro.org> - 2016-02-16 16:40 +0100

#1334704 — Re: [RFC PATCH] GPIO/ACPI: DesignWare: Add GPIO-signaled ACPI events support for power button

FromLinus Walleij <linus.walleij@linaro.org>
Date2016-02-15 19:30 +0100
SubjectRe: [RFC PATCH] GPIO/ACPI: DesignWare: Add GPIO-signaled ACPI events support for power button
Message-ID<r2w4i-4N8-29@gated-at.bofh.it>
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 <qiujiang@huawei.com> 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 <qiujiang@huawei.com>

(...)
> --- a/drivers/gpio/gpio-dwapb.c
> +++ b/drivers/gpio/gpio-dwapb.c
> @@ -23,6 +23,11 @@
>  #include <linux/spinlock.h>
>  #include <linux/platform_data/gpio-dwapb.h>
>  #include <linux/slab.h>
> +#include <linux/acpi.h>
> +#include <linux/gpio.h>

You should only need <linux/driver.h>

> +#include "gpiolib.h"

I guess this is for some acpi_gpiochip* functions that ACPI GPIO
drivers need like this:

> +       /* 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

[toc] | [next] | [standalone]


#1335329

FromJiang Qiu <qiujiang@huawei.com>
Date2016-02-16 13:40 +0100
Message-ID<r2N58-7PC-15@gated-at.bofh.it>
In reply to#1334704
在 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 <qiujiang@huawei.com> 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 <qiujiang@huawei.com>
> 
> (...)
>> --- a/drivers/gpio/gpio-dwapb.c
>> +++ b/drivers/gpio/gpio-dwapb.c
>> @@ -23,6 +23,11 @@
>>  #include <linux/spinlock.h>
>>  #include <linux/platform_data/gpio-dwapb.h>
>>  #include <linux/slab.h>
>> +#include <linux/acpi.h>
>> +#include <linux/gpio.h>
> 
> You should only need <linux/driver.h>
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
> 
> .
> 

[toc] | [prev] | [next] | [standalone]


#1335548

FromLinus Walleij <linus.walleij@linaro.org>
Date2016-02-16 16:40 +0100
Message-ID<r2PTm-1fi-57@gated-at.bofh.it>
In reply to#1335329
On Tue, Feb 16, 2016 at 1:32 PM, Jiang Qiu <qiujiang@huawei.com> wrote:
> 在 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 <qiujiang@huawei.com> 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 <qiujiang@huawei.com>
>>
>> (...)
>>> --- a/drivers/gpio/gpio-dwapb.c
>>> +++ b/drivers/gpio/gpio-dwapb.c
>>> @@ -23,6 +23,11 @@
>>>  #include <linux/spinlock.h>
>>>  #include <linux/platform_data/gpio-dwapb.h>
>>>  #include <linux/slab.h>
>>> +#include <linux/acpi.h>
>>> +#include <linux/gpio.h>
>>
>> You should only need <linux/driver.h>
> Here, I don't understand well. I used driver.h instead acpi.h and
> gpio.h, but it came to compile failed.

Argh sorry.
<linux/gpio/driver.h>

Yours,
Linus Walleij

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web