Skip to content

Commit be23147

Browse files
andrew-mtklag-linaro
authored andcommitted
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>
1 parent 7f3e3e7 commit be23147

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/mfd/mt6397-core.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ static const struct resource mt6359_keys_resources[] = {
8484
DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY_R, "homekey_r"),
8585
};
8686

87+
static const struct resource mt6359_accdet_resources[] = {
88+
DEFINE_RES_IRQ_NAMED(MT6359_IRQ_ACCDET, "accdet_irq"),
89+
DEFINE_RES_IRQ_NAMED(MT6359_IRQ_ACCDET_EINT0, "accdet_eint0"),
90+
DEFINE_RES_IRQ_NAMED(MT6359_IRQ_ACCDET_EINT1, "accdet_eint1"),
91+
};
92+
8793
static const struct resource mt6323_keys_resources[] = {
8894
DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_PWRKEY, "powerkey"),
8995
DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_FCHRKEY, "homekey"),
@@ -239,6 +245,12 @@ static const struct mfd_cell mt6359_devs[] = {
239245
.resources = mt6359_keys_resources,
240246
.of_compatible = "mediatek,mt6359-keys"
241247
},
248+
{
249+
.name = "mt6359-accdet",
250+
.of_compatible = "mediatek,mt6359-accdet",
251+
.num_resources = ARRAY_SIZE(mt6359_accdet_resources),
252+
.resources = mt6359_accdet_resources,
253+
},
242254
};
243255

244256
static const struct mfd_cell mt6397_devs[] = {

0 commit comments

Comments
 (0)