linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	dmitry.torokhov@gmail.com
Cc: matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
	linux-input@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] Input: mtk-pmic-keys - Add support for MT6331 PMIC keys
Date: Fri, 20 May 2022 17:38:37 +0200	[thread overview]
Message-ID: <871qwokyde.fsf@baylibre.com> (raw)
In-Reply-To: <20220520125132.229191-6-angelogioacchino.delregno@collabora.com>

On ven., mai 20, 2022 at 14:51, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote:

> Add support for PMIC Keys of the MT6331 PMIC.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> ---
>  drivers/input/keyboard/mtk-pmic-keys.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> index acd5aefac5f9..4a03fdfe8282 100644
> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> @@ -9,6 +9,7 @@
>  #include <linux/interrupt.h>
>  #include <linux/kernel.h>
>  #include <linux/mfd/mt6323/registers.h>
> +#include <linux/mfd/mt6331/registers.h>
>  #include <linux/mfd/mt6358/registers.h>
>  #include <linux/mfd/mt6397/core.h>
>  #include <linux/mfd/mt6397/registers.h>
> @@ -22,6 +23,10 @@
>  #define MTK_PMIC_MT6397_PWRKEY_RST_EN	BIT(6)
>  #define MTK_PMIC_MT6397_RST_DU_MASK	GENMASK(9, 8)
>  
> +#define MTK_PMIC_MT6331_HOMEKEY_RST_EN	BIT(8)
> +#define MTK_PMIC_MT6331_PWRKEY_RST_EN	BIT(9)
> +#define MTK_PMIC_MT6331_RST_DU_MASK	GENMASK(13, 12)
> +
>  #define MTK_PMIC_PWRKEY_INDEX	0
>  #define MTK_PMIC_HOMEKEY_INDEX	1
>  #define MTK_PMIC_MAX_KEY_COUNT	2
> @@ -86,6 +91,19 @@ static const struct mtk_pmic_regs mt6323_regs = {
>  	.rst_lprst_mask = MTK_PMIC_MT6397_RST_DU_MASK,
>  };
>  
> +static const struct mtk_pmic_regs mt6331_regs = {
> +	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
> +		MTK_PMIC_KEYS_REGS(MT6331_TOPSTATUS, 0x2,
> +				   MT6331_INT_MISC_CON, 0x4,
> +				   MTK_PMIC_MT6331_PWRKEY_RST_EN),
> +	.keys_regs[MTK_PMIC_HOMEKEY_INDEX] =
> +		MTK_PMIC_KEYS_REGS(MT6331_TOPSTATUS, 0x4,
> +				   MT6331_INT_MISC_CON, 0x2,
> +				   MTK_PMIC_MT6331_HOMEKEY_RST_EN),
> +	.pmic_rst_reg = MT6331_TOP_RST_MISC,
> +	.rst_lprst_mask = MTK_PMIC_MT6331_RST_DU_MASK,
> +};
> +
>  static const struct mtk_pmic_regs mt6358_regs = {
>  	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
>  		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
> @@ -284,6 +302,9 @@ static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
>  	}, {
>  		.compatible = "mediatek,mt6323-keys",
>  		.data = &mt6323_regs,
> +	}, {
> +		.compatible = "mediatek,mt6331-keys",
> +		.data = &mt6331_regs,
>  	}, {
>  		.compatible = "mediatek,mt6358-keys",
>  		.data = &mt6358_regs,
> -- 
> 2.35.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2022-05-20 15:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 12:51 [PATCH 0/5] MediaTek Helio X10 MT6795 - MT6331 PMIC Keys AngeloGioacchino Del Regno
2022-05-20 12:51 ` [PATCH 1/5] Input: mtk-pmic-keys - Add kerneldoc to driver structures AngeloGioacchino Del Regno
2022-05-20 15:38   ` Mattijs Korpershoek
2022-05-23  4:33   ` Dmitry Torokhov
2022-05-23  8:54     ` AngeloGioacchino Del Regno
2022-05-23 16:17       ` Dmitry Torokhov
2022-05-20 12:51 ` [PATCH 2/5] Input: mtk-pmic-keys - Use regmap_{set, clear}_bits where possible AngeloGioacchino Del Regno
2022-05-20 15:38   ` [PATCH 2/5] Input: mtk-pmic-keys - Use regmap_{set,clear}_bits " Mattijs Korpershoek
2022-05-23  4:51   ` Dmitry Torokhov
2022-05-23  8:58     ` AngeloGioacchino Del Regno
2022-05-23 16:58       ` Dmitry Torokhov
2022-05-20 12:51 ` [PATCH 3/5] Input: mtk-pmic-keys - Transfer per-key bit in mtk_pmic_keys_regs AngeloGioacchino Del Regno
2022-05-20 15:38   ` Mattijs Korpershoek
2022-05-20 12:51 ` [PATCH 4/5] Input: mtk-pmic-keys - Move long press debounce mask to mtk_pmic_regs AngeloGioacchino Del Regno
2022-05-20 15:38   ` Mattijs Korpershoek
2022-05-20 12:51 ` [PATCH 5/5] Input: mtk-pmic-keys - Add support for MT6331 PMIC keys AngeloGioacchino Del Regno
2022-05-20 15:38   ` Mattijs Korpershoek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qwokyde.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).