diff options
author | Mattijs Korpershoek <mkorpershoek@baylibre.com> | 2021-05-06 11:41:15 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2021-06-02 10:49:59 +0100 |
commit | 34b6677e067998122a5082691c2a3a7a6a50ea79 (patch) | |
tree | fa99c8b0474770cf0839a13e99e05647c059c97d /drivers/mfd/mt6397-core.c | |
parent | 7addf7e705c897d78f5b0f829cb7626a9279ec1e (diff) |
mfd: mt6397: Add PMIC keys for MT6358
Add compatible strings and interrupts for pmic keys
which serves as child device of MFD.
MT6358 has two interrupts per key: one for press, another one for
release (_R)
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/mt6397-core.c')
-rw-r--r-- | drivers/mfd/mt6397-core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index dd0e0eea6b97..bddb40054b9e 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -47,6 +47,13 @@ static const struct resource mt6397_rtc_resources[] = { DEFINE_RES_IRQ(MT6397_IRQ_RTC), }; +static const struct resource mt6358_keys_resources[] = { + DEFINE_RES_IRQ_NAMED(MT6358_IRQ_PWRKEY, "powerkey"), + DEFINE_RES_IRQ_NAMED(MT6358_IRQ_HOMEKEY, "homekey"), + DEFINE_RES_IRQ_NAMED(MT6358_IRQ_PWRKEY_R, "powerkey_r"), + DEFINE_RES_IRQ_NAMED(MT6358_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"), @@ -98,6 +105,11 @@ static const struct mfd_cell mt6358_devs[] = { }, { .name = "mt6358-sound", .of_compatible = "mediatek,mt6358-sound" + }, { + .name = "mt6358-keys", + .num_resources = ARRAY_SIZE(mt6358_keys_resources), + .resources = mt6358_keys_resources, + .of_compatible = "mediatek,mt6358-keys" }, }; |