summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Perepech <andrew.perepech@mediatek.com>2025-03-05 15:58:17 -0300
committerLee Jones <lee@kernel.org>2025-03-14 08:59:07 +0000
commitbe23147462296c0d8ac03af12e99b61626109b59 (patch)
tree0138d4d986fe93f7c760b2a10a47c44fb8176491
parent7f3e3e7228bb4c0b9b40987d5725c75ac2ea21f5 (diff)
mfd: mt6397-core: Add mfd_cell for mt6359-accdet
Add an mfd_cell for mt6359-accdet and describe its IRQ resources to allow the mt6359-accdet driver to probe. Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com> Acked-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20250305-mt6359-accdet-dts-v4-2-e5ffa5ee9991@collabora.com Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r--drivers/mfd/mt6397-core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 0e5d59ae064a..5f8ed8988907 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -84,6 +84,12 @@ static const struct resource mt6359_keys_resources[] = {
DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY_R, "homekey_r"),
};
+static const struct resource mt6359_accdet_resources[] = {
+ DEFINE_RES_IRQ_NAMED(MT6359_IRQ_ACCDET, "accdet_irq"),
+ DEFINE_RES_IRQ_NAMED(MT6359_IRQ_ACCDET_EINT0, "accdet_eint0"),
+ DEFINE_RES_IRQ_NAMED(MT6359_IRQ_ACCDET_EINT1, "accdet_eint1"),
+};
+
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"),
@@ -239,6 +245,12 @@ static const struct mfd_cell mt6359_devs[] = {
.resources = mt6359_keys_resources,
.of_compatible = "mediatek,mt6359-keys"
},
+ {
+ .name = "mt6359-accdet",
+ .of_compatible = "mediatek,mt6359-accdet",
+ .num_resources = ARRAY_SIZE(mt6359_accdet_resources),
+ .resources = mt6359_accdet_resources,
+ },
};
static const struct mfd_cell mt6397_devs[] = {