2022-04-16 02:05:49

by Fabien Parent

[permalink] [raw]
Subject: [PATCH 3/7] mfd: mt6397-core: add resources for PMIC keys for MT6359

Add the MFD resources in order to be able to probe and use the keyboard
driver for the MT6359 PMIC.

Signed-off-by: Fabien Parent <[email protected]>
---
drivers/mfd/mt6397-core.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index bddb40054b9e..1a368ad08f58 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -54,6 +54,13 @@ static const struct resource mt6358_keys_resources[] = {
DEFINE_RES_IRQ_NAMED(MT6358_IRQ_HOMEKEY_R, "homekey_r"),
};

+static const struct resource mt6359_keys_resources[] = {
+ DEFINE_RES_IRQ_NAMED(MT6359_IRQ_PWRKEY, "powerkey"),
+ DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY, "homekey"),
+ DEFINE_RES_IRQ_NAMED(MT6359_IRQ_PWRKEY_R, "powerkey_r"),
+ DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY_R, "homekey_r"),
+};
+
static const struct resource mt6323_keys_resources[] = {
DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_PWRKEY, "powerkey"),
DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_FCHRKEY, "homekey"),
@@ -122,6 +129,12 @@ static const struct mfd_cell mt6359_devs[] = {
.of_compatible = "mediatek,mt6358-rtc",
},
{ .name = "mt6359-sound", },
+ {
+ .name = "mtk-pmic-keys",
+ .num_resources = ARRAY_SIZE(mt6359_keys_resources),
+ .resources = mt6359_keys_resources,
+ .of_compatible = "mediatek,mt6359-keys"
+ },
};

static const struct mfd_cell mt6397_devs[] = {
--
2.35.2


2022-04-27 11:26:50

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 3/7] mfd: mt6397-core: add resources for PMIC keys for MT6359

On Fri, 15 Apr 2022, Fabien Parent wrote:

> Add the MFD resources in order to be able to probe and use the keyboard
> driver for the MT6359 PMIC.
>
> Signed-off-by: Fabien Parent <[email protected]>
> ---
> drivers/mfd/mt6397-core.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)

Applied, thanks.

--
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog