* [PATCH v2 RESEND] Input: mtk-pmic-keys - Add support for MT6331 PMIC keys
@ 2022-07-06 10:11 AngeloGioacchino Del Regno
2022-07-06 11:44 ` kernel test robot
2022-07-06 13:32 ` Matthias Brugger
0 siblings, 2 replies; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-06 10:11 UTC (permalink / raw)
To: dmitry.torokhov
Cc: matthias.bgg, angelogioacchino.delregno, mkorpershoek,
linux-input, linux-arm-kernel, linux-mediatek, linux-kernel
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 6404081253ea..9b34da0ec260 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_PWRKEY_RST BIT(6)
#define MTK_PMIC_HOMEKEY_RST BIT(5)
+#define MTK_PMIC_MT6331_RST_DU_MASK GENMASK(13, 12)
+#define MTK_PMIC_MT6331_PWRKEY_RST BIT(9)
+#define MTK_PMIC_MT6331_HOMEKEY_RST BIT(8)
+
#define MTK_PMIC_PWRKEY_INDEX 0
#define MTK_PMIC_HOMEKEY_INDEX 1
#define MTK_PMIC_MAX_KEY_COUNT 2
@@ -72,6 +77,19 @@ static const struct mtk_pmic_regs mt6323_regs = {
.rst_lprst_mask = MTK_PMIC_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),
+ .keys_regs[MTK_PMIC_HOMEKEY_INDEX] =
+ MTK_PMIC_KEYS_REGS(MT6331_TOPSTATUS, 0x4,
+ MT6331_INT_MISC_CON, 0x2,
+ MTK_PMIC_MT6331_HOMEKEY_RST),
+ .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,
@@ -255,6 +273,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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 RESEND] Input: mtk-pmic-keys - Add support for MT6331 PMIC keys
2022-07-06 10:11 [PATCH v2 RESEND] Input: mtk-pmic-keys - Add support for MT6331 PMIC keys AngeloGioacchino Del Regno
@ 2022-07-06 11:44 ` kernel test robot
2022-07-06 12:13 ` AngeloGioacchino Del Regno
2022-07-06 13:32 ` Matthias Brugger
1 sibling, 1 reply; 5+ messages in thread
From: kernel test robot @ 2022-07-06 11:44 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, dmitry.torokhov
Cc: kbuild-all, matthias.bgg, angelogioacchino.delregno, mkorpershoek,
linux-input, linux-arm-kernel, linux-mediatek, linux-kernel
Hi AngeloGioacchino,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on dtor-input/next]
[also build test ERROR on linus/master v5.19-rc5 next-20220705]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/AngeloGioacchino-Del-Regno/Input-mtk-pmic-keys-Add-support-for-MT6331-PMIC-keys/20220706-181323
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: arc-randconfig-r043-20220703 (https://download.01.org/0day-ci/archive/20220706/202207061915.tYTQKEhu-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/5e286347fa7c13c4674f97ed475e4f42a49ce5b4
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review AngeloGioacchino-Del-Regno/Input-mtk-pmic-keys-Add-support-for-MT6331-PMIC-keys/20220706-181323
git checkout 5e286347fa7c13c4674f97ed475e4f42a49ce5b4
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/input/keyboard/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/input/keyboard/mtk-pmic-keys.c:12:10: fatal error: linux/mfd/mt6331/registers.h: No such file or directory
12 | #include <linux/mfd/mt6331/registers.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
vim +12 drivers/input/keyboard/mtk-pmic-keys.c
> 12 #include <linux/mfd/mt6331/registers.h>
13 #include <linux/mfd/mt6358/registers.h>
14 #include <linux/mfd/mt6397/core.h>
15 #include <linux/mfd/mt6397/registers.h>
16 #include <linux/module.h>
17 #include <linux/of_device.h>
18 #include <linux/of.h>
19 #include <linux/platform_device.h>
20 #include <linux/regmap.h>
21
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 RESEND] Input: mtk-pmic-keys - Add support for MT6331 PMIC keys
2022-07-06 11:44 ` kernel test robot
@ 2022-07-06 12:13 ` AngeloGioacchino Del Regno
2022-07-08 21:51 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-06 12:13 UTC (permalink / raw)
To: kernel test robot, dmitry.torokhov
Cc: kbuild-all, matthias.bgg, mkorpershoek, linux-input,
linux-arm-kernel, linux-mediatek, linux-kernel
Il 06/07/22 13:44, kernel test robot ha scritto:
> Hi AngeloGioacchino,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on dtor-input/next]
> [also build test ERROR on linus/master v5.19-rc5 next-20220705]
This patch compiles fine on next-20220706.
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/intel-lab-lkp/linux/commits/AngeloGioacchino-Del-Regno/Input-mtk-pmic-keys-Add-support-for-MT6331-PMIC-keys/20220706-181323
> base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
> config: arc-randconfig-r043-20220703 (https://download.01.org/0day-ci/archive/20220706/202207061915.tYTQKEhu-lkp@intel.com/config)
> compiler: arceb-elf-gcc (GCC) 11.3.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/intel-lab-lkp/linux/commit/5e286347fa7c13c4674f97ed475e4f42a49ce5b4
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review AngeloGioacchino-Del-Regno/Input-mtk-pmic-keys-Add-support-for-MT6331-PMIC-keys/20220706-181323
> git checkout 5e286347fa7c13c4674f97ed475e4f42a49ce5b4
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/input/keyboard/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>>> drivers/input/keyboard/mtk-pmic-keys.c:12:10: fatal error: linux/mfd/mt6331/registers.h: No such file or directory
> 12 | #include <linux/mfd/mt6331/registers.h>
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
>
>
> vim +12 drivers/input/keyboard/mtk-pmic-keys.c
>
> > 12 #include <linux/mfd/mt6331/registers.h>
> 13 #include <linux/mfd/mt6358/registers.h>
> 14 #include <linux/mfd/mt6397/core.h>
> 15 #include <linux/mfd/mt6397/registers.h>
> 16 #include <linux/module.h>
> 17 #include <linux/of_device.h>
> 18 #include <linux/of.h>
> 19 #include <linux/platform_device.h>
> 20 #include <linux/regmap.h>
> 21
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 RESEND] Input: mtk-pmic-keys - Add support for MT6331 PMIC keys
2022-07-06 10:11 [PATCH v2 RESEND] Input: mtk-pmic-keys - Add support for MT6331 PMIC keys AngeloGioacchino Del Regno
2022-07-06 11:44 ` kernel test robot
@ 2022-07-06 13:32 ` Matthias Brugger
1 sibling, 0 replies; 5+ messages in thread
From: Matthias Brugger @ 2022-07-06 13:32 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, dmitry.torokhov
Cc: mkorpershoek, linux-input, linux-arm-kernel, linux-mediatek,
linux-kernel
On 06/07/2022 12:11, AngeloGioacchino Del Regno 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>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.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 6404081253ea..9b34da0ec260 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_PWRKEY_RST BIT(6)
> #define MTK_PMIC_HOMEKEY_RST BIT(5)
>
> +#define MTK_PMIC_MT6331_RST_DU_MASK GENMASK(13, 12)
> +#define MTK_PMIC_MT6331_PWRKEY_RST BIT(9)
> +#define MTK_PMIC_MT6331_HOMEKEY_RST BIT(8)
> +
> #define MTK_PMIC_PWRKEY_INDEX 0
> #define MTK_PMIC_HOMEKEY_INDEX 1
> #define MTK_PMIC_MAX_KEY_COUNT 2
> @@ -72,6 +77,19 @@ static const struct mtk_pmic_regs mt6323_regs = {
> .rst_lprst_mask = MTK_PMIC_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),
> + .keys_regs[MTK_PMIC_HOMEKEY_INDEX] =
> + MTK_PMIC_KEYS_REGS(MT6331_TOPSTATUS, 0x4,
> + MT6331_INT_MISC_CON, 0x2,
> + MTK_PMIC_MT6331_HOMEKEY_RST),
> + .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,
> @@ -255,6 +273,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,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 RESEND] Input: mtk-pmic-keys - Add support for MT6331 PMIC keys
2022-07-06 12:13 ` AngeloGioacchino Del Regno
@ 2022-07-08 21:51 ` Dmitry Torokhov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2022-07-08 21:51 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: kernel test robot, kbuild-all, matthias.bgg, mkorpershoek,
linux-input, linux-arm-kernel, linux-mediatek, linux-kernel
On Wed, Jul 06, 2022 at 02:13:45PM +0200, AngeloGioacchino Del Regno wrote:
> Il 06/07/22 13:44, kernel test robot ha scritto:
> > Hi AngeloGioacchino,
> >
> > Thank you for the patch! Yet something to improve:
> >
> > [auto build test ERROR on dtor-input/next]
> > [also build test ERROR on linus/master v5.19-rc5 next-20220705]
>
>
> This patch compiles fine on next-20220706.
Unfortunately linux/mfd/mt6331/registers.h is still not in mainline. We
either need to wait when it gets there or ask Lee for an immutable
branch that would contain shared definitions that I cam pull from.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-07-08 21:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-06 10:11 [PATCH v2 RESEND] Input: mtk-pmic-keys - Add support for MT6331 PMIC keys AngeloGioacchino Del Regno
2022-07-06 11:44 ` kernel test robot
2022-07-06 12:13 ` AngeloGioacchino Del Regno
2022-07-08 21:51 ` Dmitry Torokhov
2022-07-06 13:32 ` Matthias Brugger
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).