Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1374075
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Linus Walleij <linus.walleij@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v7 3/3] gpio: dwapb: add gpio-signaled acpi event support |
| Date | Fri, 08 Apr 2016 10:30:02 +0200 |
| Message-ID | <rlzXI-XP-7@gated-at.bofh.it> (permalink) |
| References | <rkPBw-8oO-19@gated-at.bofh.it> <rkPBw-8oO-27@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=DixfHxnGA81eoPmQGRAILMbr+0cKlyZR1b1FD4cBamA=; b=Wvj3QjQ1fSbKyysUmJgNyyP3Y8WASKj8MP8YyBqVcRex7AACfLwW4oQ9C8ra8qUOU3 D1Ox0q7sm5ljBPV4JfQbnKrMb7PaikROnsJKpY12qPGblNSoXuTYI5Y49kqnGKhEfbNH kNtAdJByfqtLblOIY2TBMdCeJFb5LS/hsL3gQ= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=DixfHxnGA81eoPmQGRAILMbr+0cKlyZR1b1FD4cBamA=; b=R4aF5j0naUL0T3WAVwul/fqSh5b0FnUWjqn7WJ/Kfb5WqICkOGA9nXgtjZ5NOnDU0Z AdiPOojN9zaCNmklfSxj3XlkLCFefEhkIESQkwi56qtEaLfyQUpSo0vbss2vQEGV66Wv U7iKj7K97tauF5RK66aAQtAespo7ATP7pDnlSJGaEZIT52/b8CaJSkRgLfqKe3gT75Du vdfpb6Y7YF5gTl0RqFIHbn28bjXEX/3zZuOCmcabbSrCxGl0kCe0lXu69lX2/+BW0ylg EXqFb6iFf95FfurXQJ5YLBfeiKSXpi8B+/YWZMlSyBw1QkdD+e3nJqjeVxGVfVl+eK/z JuLw== |
| X-Gm-Message-State | AD7BkJIP70g6BlM+AtXlCQO/28zEmhQAN0yCYz/SLZ4HlPgAxKPc9urm6y1i/KV0hYO9wgxYc6Ep+1ROew7+aDwK |
| MIME-Version | 1.0 |
| X-Received | by 10.202.105.205 with SMTP id e196mr3590475oic.113.1460103988764; Fri, 08 Apr 2016 01:26:28 -0700 (PDT) |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 66 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Alexandre Courbot <gnurou@gmail.com>, Mika Westerberg <mika.westerberg@linux.intel.com>, Andy Shevchenko <andy.shevchenko@gmail.com>, Alan Tull <delicious.quinoa@gmail.com>, Jamie Iles <jamie@jamieiles.com>, charles.chenxin@huawei.com, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>, ACPI Devel Maling List <linux-acpi@vger.kernel.org>, Linuxarm <linuxarm@huawei.com> |
| X-Original-Date | Fri, 8 Apr 2016 10:26:28 +0200 |
| X-Original-Message-ID | <CACRpkdb63AZtEOSJ0R+EqdHfKXcUr7Hs8fh9N5XHNcWjQ1Ba8A@mail.gmail.com> |
| X-Original-References | <1459926480-32966-1-git-send-email-qiujiang@huawei.com> <1459926480-32966-4-git-send-email-qiujiang@huawei.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1374075 |
Show key headers only | View raw
On Wed, Apr 6, 2016 at 9:08 AM, qiujiang <qiujiang@huawei.com> wrote:
> This patch adds gpio-signaled acpi event support. It is used for
> power button on hisilicon D02 board, an arm64 platform.
>
> The corresponding DSDT file is defined as follows:
> Device(GPI0) {
> Name(_HID, "HISI0181")
> Name(_ADR, 0)
> Name(_UID, 0)
>
> Name (_CRS, ResourceTemplate () {
> Memory32Fixed (ReadWrite, 0x802e0000, 0x10000)
> Interrupt (ResourceConsumer, Level, ActiveHigh,
> Exclusive,,,) {344}
> })
>
> Device(PRTa) {
> Name (_DSD, Package () {
> Package () {
> Package () {"reg",0},
> Package () {"snps,nr-gpios",32},
> }
> })
> }
>
> Name (_AEI, ResourceTemplate () {
> GpioInt(Edge, ActiveLow, ExclusiveAndWake,
> PullUp, , " \\_SB.GPI0") {8}
> })
>
> Method (_E08, 0x0, NotSerialized) {
> Notify (\_SB.PWRB, 0x80)
> }
> }
>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: qiujiang <qiujiang@huawei.com>
Admittedly I'm an ACPI novice and need help with deciding
about ACPI, but I mostly trust Mika to know these things right.
About this:
> + /* Add GPIO-signaled ACPI event support */
> + if (pp->irq)
> + acpi_gpiochip_request_interrupts(&port->gc);
It's weird to me that the driver already has a requested IRQ and
everything, now it has to request it again from ACPI.
When I look into the acpi_gpiochip_request_interrupts()
I find it weird that it is void given how much can go wrong
inside it. Should it not return an errorcode?
> + if (has_acpi_companion(dev) && pp->idx == 0)
> + pp->irq = platform_get_irq(to_platform_device(dev), 0);
As it was already fetched here and then later requested,
we still have to call acpi_gpiochip_request_interrupts()
further down the road? That is confusing to me, can you
explain what is going on?
Yours,
Linus Walleij
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v7 0/3] gpio: dwapb: add gpio-signaled acpi event support for power button qiujiang <qiujiang@huawei.com> - 2016-04-06 09:00 +0200
[PATCH v7 3/3] gpio: dwapb: add gpio-signaled acpi event support qiujiang <qiujiang@huawei.com> - 2016-04-06 09:00 +0200
Re: [PATCH v7 3/3] gpio: dwapb: add gpio-signaled acpi event support Linus Walleij <linus.walleij@linaro.org> - 2016-04-08 10:30 +0200
Re: [PATCH v7 3/3] gpio: dwapb: add gpio-signaled acpi event support Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-04-08 10:40 +0200
Re: [PATCH v7 3/3] gpio: dwapb: add gpio-signaled acpi event support Jiang Qiu <qiujiang@huawei.com> - 2016-04-11 14:50 +0200
Re: [PATCH v7 3/3] gpio: dwapb: add gpio-signaled acpi event support Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-04-12 08:50 +0200
Re: [PATCH v7 3/3] gpio: dwapb: add gpio-signaled acpi event support Jiang Qiu <qiujiang@huawei.com> - 2016-04-12 09:00 +0200
Re: [PATCH v7 3/3] gpio: dwapb: add gpio-signaled acpi event support Linus Walleij <linus.walleij@linaro.org> - 2016-04-15 09:50 +0200
Re: [PATCH v7 3/3] gpio: dwapb: add gpio-signaled acpi event support Jiang Qiu <qiujiang@huawei.com> - 2016-04-15 10:00 +0200
Re: [PATCH v7 3/3] gpio: dwapb: add gpio-signaled acpi event support Linus Walleij <linus.walleij@linaro.org> - 2016-04-11 15:10 +0200
Re: [PATCH v7 3/3] gpio: dwapb: add gpio-signaled acpi event support Jiang Qiu <qiujiang@huawei.com> - 2016-04-11 14:40 +0200
[PATCH v7 1/3] gpio: dwapb: remove name from dwapb_port_property qiujiang <qiujiang@huawei.com> - 2016-04-06 09:00 +0200
Re: [PATCH v7 1/3] gpio: dwapb: remove name from dwapb_port_property Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-04-06 15:00 +0200
Re: [PATCH v7 1/3] gpio: dwapb: remove name from dwapb_port_property Jiang Qiu <qiujiang@huawei.com> - 2016-04-07 13:50 +0200
Re: [PATCH v7 0/3] gpio: dwapb: add gpio-signaled acpi event support for power button Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-04-06 15:10 +0200
csiph-web