diff options
author | Chen Zhong <chen.zhong@mediatek.com> | 2017-10-25 21:16:04 +0800 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2018-04-16 15:16:11 +0100 |
commit | 55d1d1547ab5e52269988af5e7c553796ff68e97 (patch) | |
tree | 01bbe62b7fa047f5b9eab93e575a7e73d6bdbb1c /drivers/mfd | |
parent | 3e9f0b3e2b27c0aa1d8d317ff293d9832659d6e9 (diff) | |
download | linux-55d1d1547ab5e52269988af5e7c553796ff68e97.tar.gz linux-55d1d1547ab5e52269988af5e7c553796ff68e97.tar.bz2 linux-55d1d1547ab5e52269988af5e7c553796ff68e97.zip |
mfd: mt6397: Add PMIC keys support to MT6397 driver
This patch adds compatible strings and interrupts for pmic keys
which serves as child device of MFD.
Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/mt6397-core.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 6546d7f88b5e..77b64bd64df3 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -43,6 +43,16 @@ static const struct resource mt6397_rtc_resources[] = { }, }; +static const struct resource mt6323_keys_resources[] = { + DEFINE_RES_IRQ(MT6323_IRQ_STATUS_PWRKEY), + DEFINE_RES_IRQ(MT6323_IRQ_STATUS_FCHRKEY), +}; + +static const struct resource mt6397_keys_resources[] = { + DEFINE_RES_IRQ(MT6397_IRQ_PWRKEY), + DEFINE_RES_IRQ(MT6397_IRQ_HOMEKEY), +}; + static const struct mfd_cell mt6323_devs[] = { { .name = "mt6323-regulator", @@ -50,6 +60,11 @@ static const struct mfd_cell mt6323_devs[] = { }, { .name = "mt6323-led", .of_compatible = "mediatek,mt6323-led" + }, { + .name = "mtk-pmic-keys", + .num_resources = ARRAY_SIZE(mt6323_keys_resources), + .resources = mt6323_keys_resources, + .of_compatible = "mediatek,mt6323-keys" }, }; @@ -71,7 +86,12 @@ static const struct mfd_cell mt6397_devs[] = { }, { .name = "mt6397-pinctrl", .of_compatible = "mediatek,mt6397-pinctrl", - }, + }, { + .name = "mtk-pmic-keys", + .num_resources = ARRAY_SIZE(mt6397_keys_resources), + .resources = mt6397_keys_resources, + .of_compatible = "mediatek,mt6397-keys" + } }; static void mt6397_irq_lock(struct irq_data *data) |