From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>
Cc: linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org,
joeyli <jlee@suse.com>, Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH v5] gpio: Add driver for ACPI INT0002 Virtual GPIO device
Date: Wed, 24 May 2017 14:23:23 +0300 [thread overview]
Message-ID: <1495625003.6967.93.camel@linux.intel.com> (raw)
In-Reply-To: <20170524104216.23643-1-hdegoede@redhat.com>
On Wed, 2017-05-24 at 12:42 +0200, Hans de Goede wrote:
> Some peripherals on Bay Trail and Cherry Trail platforms signal PME to
> the
> PMC to wakeup the system. When this happens software needs to clear
> the
> PME_B0_STS bit in the GPE0a_STS register to avoid an IRQ storm on IRQ
> 9.
>
> This is modeled in ACPI through the INT0002 ACPI Virtual GPIO device.
>
> This commit adds a driver which registers the Virtual GPIOs expected
> by the DSDT on these devices, letting gpiolib-acpi claim the
> virtual GPIO and install a GPIO-interrupt handler which call the _L02
> handler as it would for a real GPIO controller.
>
> Cc: joeyli <jlee@suse.com>
> Cc: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
In addition to my comment to v4 (if you are going to apply it) couple of
nits below. (I'm fine with current version, as tag says, though consider
them anyway)
> +#define GPE0A_PME_B0_STS_BIT BIT(13)
> +#define GPE0A_PME_B0_EN_BIT BIT(13)
> +#define GPE0A_STS_PORT 0x420
> +#define GPE0A_EN_PORT 0x428
Perhaps squeeze bits after actual ports like
ADDRESSa
ADDRa_BITa
ADDRESSb
ADDRb_BITa
> + for (i = 0; i < GPE0A_PME_B0_VIRT_GPIO_PIN; i++)
> + clear_bit(i, chip->irq_valid_mask);
bitmap_zero() ?
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2017-05-24 11:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 10:42 [PATCH v5] gpio: Add driver for ACPI INT0002 Virtual GPIO device Hans de Goede
2017-05-24 11:23 ` Andy Shevchenko [this message]
2017-05-24 12:10 ` Hans de Goede
2017-05-24 23:12 ` Rafael J. Wysocki
2017-05-27 19:28 ` Rafael J. Wysocki
2017-06-01 15:11 ` Linus Walleij
2017-06-01 15:20 ` Hans de Goede
2017-06-01 15:29 ` Linus Walleij
2017-06-01 16:35 ` Rafael J. Wysocki
2017-06-01 15:23 ` Linus Walleij
2017-06-02 11:10 ` Andy Shevchenko
2017-06-02 14:01 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1495625003.6967.93.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=gnurou@gmail.com \
--cc=hdegoede@redhat.com \
--cc=jlee@suse.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).