Message ID | 20221005-mt6357-support-v2-5-f17ba2d2d0a9@baylibre.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Add MediaTek MT6357 PMIC support | expand |
On Wed, Oct 05, 2022 at 16:57, Alexandre Mergnat <amergnat@baylibre.com> wrote: > From: Fabien Parent <fparent@baylibre.com> > > Add PMIC Keys support on MT6357 SoC. > > Signed-off-by: Fabien Parent <fparent@baylibre.com> > Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> > --- > drivers/input/keyboard/mtk-pmic-keys.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c > index 9b34da0ec260..2a63e0718eb6 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, > @@ -276,6 +290,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, > > -- > b4 0.10.1
Il 05/10/22 16:57, Alexandre Mergnat ha scritto: > From: Fabien Parent <fparent@baylibre.com> > > Add PMIC Keys support on MT6357 SoC. > > Signed-off-by: Fabien Parent <fparent@baylibre.com> > Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com> > Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
On Wed, Oct 05, 2022 at 04:57:25PM +0200, Alexandre Mergnat wrote: > From: Fabien Parent <fparent@baylibre.com> > > Add PMIC Keys support on MT6357 SoC. > > Signed-off-by: Fabien Parent <fparent@baylibre.com> > Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Please merge through MFD tree with the rest of the patches. > --- > drivers/input/keyboard/mtk-pmic-keys.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c > index 9b34da0ec260..2a63e0718eb6 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, > @@ -276,6 +290,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, > > -- > b4 0.10.1 Thanks.
On Mon, 10 Oct 2022, Dmitry Torokhov wrote: > On Wed, Oct 05, 2022 at 04:57:25PM +0200, Alexandre Mergnat wrote: > > From: Fabien Parent <fparent@baylibre.com> > > > > Add PMIC Keys support on MT6357 SoC. > > > > Signed-off-by: Fabien Parent <fparent@baylibre.com> > > Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com> > > Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> > > Please merge through MFD tree with the rest of the patches. The MFD part is only a small doc change. The Input and Regulator changes should be merged through their own subsystems IMHO.
diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c index 9b34da0ec260..2a63e0718eb6 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, @@ -276,6 +290,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,