From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Mark Hasemeyer <markhas@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Tzung-Bi Shih <tzungbi@kernel.org>,
Raul Rangel <rrangel@chromium.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh@kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Bartosz Golaszewski <brgl@bgdev.pl>, Len Brown <lenb@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Wolfram Sang <wsa@kernel.org>,
linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH v2 01/22] gpiolib: acpi: Modify acpi_dev_irq_wake_get_by() to use resource
Date: Thu, 21 Dec 2023 17:17:07 +0200 [thread overview]
Message-ID: <ZYRW84GX-SOEKDIG@smile.fi.intel.com> (raw)
In-Reply-To: <20231220165423.v2.1.Ifd0903f1c351e84376d71dbdadbd43931197f5ea@changeid>
On Wed, Dec 20, 2023 at 04:54:15PM -0700, Mark Hasemeyer wrote:
> Other information besides wake capability can be provided about GPIO
> IRQs such as triggering, polarity, and sharability. Use resource flags
> to provide this information to the caller if they want it.
>
> This should keep the API more robust over time as flags are added,
> modified, or removed. It also more closely matches acpi_irq_get() which
> take a resource as an argument.
>
> Rename the function to acpi_dev_get_gpio_irq_resource() to better
> describe the function's new behavior.
...
> + *r = DEFINE_RES_IRQ(irq);
> + r->flags = acpi_dev_irq_flags(info.triggering, info.polarity,
> + info.shareable, info.wake_capable);
Looking at this I am wondering if we can actually to have
unsigned long irq_flags;
...
irq_flags = acpi_dev_irq_flags(info.triggering, info.polarity,
info.shareable, info.wake_capable);
*r = DEFINE_RES_NAMED(irq, 1, NULL, irq_flags);
as we don't need to duplicate IORESOURCE_IRQ.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-12-21 15:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-20 23:54 [PATCH v2 00/22] Improve IRQ wake capability reporting and update the cros_ec driver to use it Mark Hasemeyer
2023-12-20 23:54 ` [PATCH v2 01/22] gpiolib: acpi: Modify acpi_dev_irq_wake_get_by() to use resource Mark Hasemeyer
2023-12-21 15:17 ` Andy Shevchenko [this message]
2023-12-23 2:05 ` kernel test robot
2023-12-23 3:09 ` Mark Hasemeyer
2023-12-21 13:42 ` [PATCH v2 00/22] Improve IRQ wake capability reporting and update the cros_ec driver to use it Andy Shevchenko
2023-12-22 22:30 ` Mark Hasemeyer
2023-12-27 16:01 ` Andy Shevchenko
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=ZYRW84GX-SOEKDIG@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=brgl@bgdev.pl \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lenb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markhas@chromium.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rrangel@chromium.org \
--cc=sudeep.holla@arm.com \
--cc=tzungbi@kernel.org \
--cc=wsa@kernel.org \
/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).