]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mfd: mt6397-core: Add mfd_cell for mt6359-accdet
authorAndrew Perepech <andrew.perepech@mediatek.com>
Wed, 5 Mar 2025 18:58:17 +0000 (15:58 -0300)
committerLee Jones <lee@kernel.org>
Fri, 14 Mar 2025 08:59:07 +0000 (08:59 +0000)
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>
drivers/mfd/mt6397-core.c

index 0e5d59ae064a696ae2111e2b558b316667c14773..5f8ed898890783c0ce4e34c7eae0d8f678e7d7bc 100644 (file)
@@ -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[] = {