From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Fabien Parent <fparent@baylibre.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: Fabien Parent <fparent@baylibre.com>,
linux-input@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/7] Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs
Date: Thu, 21 Apr 2022 17:57:05 +0200 [thread overview]
Message-ID: <87fsm6zay6.fsf@baylibre.com> (raw)
In-Reply-To: <20220415153629.1817202-6-fparent@baylibre.com>
On ven., avril 15, 2022 at 17:36, Fabien Parent <fparent@baylibre.com> wrote:
> The MT6358 PMIC is not the only PMIC to have release IRQs. In order to
> support more PMIC that supports release IRQs, such as MT6357, MT6359,
> and possibly others, let's add some field in the platform data to
> indicate whether a PMIC support release keys.
>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on mt8183-pumpkin
> ---
> drivers/input/keyboard/mtk-pmic-keys.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> index a0da644fe93d..609b87afd020 100644
> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> @@ -53,6 +53,7 @@ struct mtk_pmic_keys_regs {
> struct mtk_pmic_keys_pdata {
> const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
> u32 pmic_rst_reg;
> + bool has_key_release_irqs;
> };
>
> static const struct mtk_pmic_keys_pdata mt6397_pdata = {
> @@ -83,6 +84,7 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = {
> MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
> 0x8, MT6358_PSC_TOP_INT_CON0, 0xa),
> .pmic_rst_reg = MT6358_TOP_RST_MISC,
> + .has_key_release_irqs = true,
> };
>
> struct mtk_pmic_keys_info {
> @@ -319,7 +321,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
> return keys->keys[index].irq;
> }
>
> - if (of_device_is_compatible(node, "mediatek,mt6358-keys")) {
> + if (mtk_pmic_keys_pdata->has_key_release_irqs) {
> keys->keys[index].irq_r = platform_get_irq_byname(pdev,
> irqnames_r[index]);
>
> --
> 2.35.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-04-21 15:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-15 15:36 [PATCH 0/7] Input: mtk-pmic-keys: Add support for MT6359 PMIC Fabien Parent
2022-04-15 15:36 ` [PATCH 1/7] dt-bindings: input: mtk-pmic-keys: add MT6359 binding definition Fabien Parent
2022-04-15 15:36 ` [PATCH 2/7] mfd: add missing defines necessary for mtk-pmic-keys support Fabien Parent
2022-04-26 14:14 ` Lee Jones
2022-04-15 15:36 ` [PATCH 3/7] mfd: mt6397-core: add resources for PMIC keys for MT6359 Fabien Parent
2022-04-26 14:14 ` Lee Jones
2022-04-15 15:36 ` [PATCH 4/7] Input: mtk-pmic-keys: rename platform data struct Fabien Parent
2022-04-21 15:56 ` Mattijs Korpershoek
2022-04-15 15:36 ` [PATCH 5/7] Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs Fabien Parent
2022-04-21 15:57 ` Mattijs Korpershoek [this message]
2022-04-15 15:36 ` [PATCH 6/7] Input: keyboard: mtk-pmic-keys: add support for MT6359 Fabien Parent
2022-04-15 15:36 ` [PATCH 7/7] arm64: dts: mediatek: mt6359: add node for PMIC keys support Fabien Parent
2022-04-21 10:33 ` AngeloGioacchino Del Regno
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=87fsm6zay6.fsf@baylibre.com \
--to=mkorpershoek@baylibre.com \
--cc=dmitry.torokhov@gmail.com \
--cc=fparent@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
/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).