diff options
author | Fabien Parent <fparent@baylibre.com> | 2023-01-02 17:06:07 +0100 |
---|---|---|
committer | Matthias Brugger <matthias.bgg@gmail.com> | 2023-01-19 18:25:44 +0100 |
commit | 297770ec5c935b31e7a3c0deccc3f8a2a7829451 (patch) | |
tree | eef8c25089fd213c79cc08eb2470cb3f9b6c9a2d /drivers/input/keyboard | |
parent | dt-bindings: mfd: mediatek: Add bindings for MT6357 PMIC (diff) | |
download | linux-297770ec5c935b31e7a3c0deccc3f8a2a7829451.tar.xz linux-297770ec5c935b31e7a3c0deccc3f8a2a7829451.zip |
Input: mtk-pmic-keys: add MT6357 support
Add PMIC Keys support on MT6357 SoC.
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-6-560caaafee53@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/mtk-pmic-keys.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c index 3d4ffa25e3df..4364c3401ff1 100644 --- a/drivers/input/keyboard/mtk-pmic-keys.c +++ b/drivers/input/keyboard/mtk-pmic-keys.c @@ -10,6 +10,7 @@ #include <linux/kernel.h> #include <linux/mfd/mt6323/registers.h> #include <linux/mfd/mt6331/registers.h> +#include <linux/mfd/mt6357/registers.h> #include <linux/mfd/mt6358/registers.h> #include <linux/mfd/mt6397/core.h> #include <linux/mfd/mt6397/registers.h> @@ -90,6 +91,19 @@ static const struct mtk_pmic_regs mt6331_regs = { .rst_lprst_mask = MTK_PMIC_MT6331_RST_DU_MASK, }; +static const struct mtk_pmic_regs mt6357_regs = { + .keys_regs[MTK_PMIC_PWRKEY_INDEX] = + MTK_PMIC_KEYS_REGS(MT6357_TOPSTATUS, + 0x2, MT6357_PSC_TOP_INT_CON0, 0x5, + MTK_PMIC_PWRKEY_RST), + .keys_regs[MTK_PMIC_HOMEKEY_INDEX] = + MTK_PMIC_KEYS_REGS(MT6357_TOPSTATUS, + 0x8, MT6357_PSC_TOP_INT_CON0, 0xa, + MTK_PMIC_HOMEKEY_INDEX), + .pmic_rst_reg = MT6357_TOP_RST_MISC, + .rst_lprst_mask = MTK_PMIC_RST_DU_MASK, +}; + static const struct mtk_pmic_regs mt6358_regs = { .keys_regs[MTK_PMIC_PWRKEY_INDEX] = MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS, @@ -277,6 +291,9 @@ static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = { .compatible = "mediatek,mt6331-keys", .data = &mt6331_regs, }, { + .compatible = "mediatek,mt6357-keys", + .data = &mt6357_regs, + }, { .compatible = "mediatek,mt6358-keys", .data = &mt6358_regs, }, { |