All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Input: mtk-pmic-keys: Add support for MT6359 PMIC
@ 2022-04-15 15:36 ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Matthias Brugger; +Cc: Fabien Parent, linux-arm-kernel, linux-mediatek

This patch serie adds support for the MT6359 PMIC keyboard driver.

The last commit has a dependency on:
https://patchwork.kernel.org/project/linux-mediatek/patch/1622011927-359-9-git-send-email-hsin-hsiung.wang@mediatek.com/

Fabien Parent (7):
  dt-bindings: input: mtk-pmic-keys: add MT6359 binding definition
  mfd: add missing defines necessary for mtk-pmic-keys support
  mfd: mt6397-core: add resources for PMIC keys for MT6359
  Input: mtk-pmic-keys: rename platform data struct
  Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs
  Input: keyboard: mtk-pmic-keys: add support for MT6359
  arm64: dts: mediatek: mt6359: add node for PMIC keys support

 .../bindings/input/mtk-pmic-keys.txt          |  1 +
 arch/arm64/boot/dts/mediatek/mt6359.dtsi      | 15 +++++++
 drivers/input/keyboard/mtk-pmic-keys.c        | 41 +++++++++++++------
 drivers/mfd/mt6397-core.c                     | 13 ++++++
 include/linux/mfd/mt6359/registers.h          |  2 +
 5 files changed, 60 insertions(+), 12 deletions(-)

-- 
2.35.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 0/7] Input: mtk-pmic-keys: Add support for MT6359 PMIC
@ 2022-04-15 15:36 ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Matthias Brugger; +Cc: Fabien Parent, linux-arm-kernel, linux-mediatek

This patch serie adds support for the MT6359 PMIC keyboard driver.

The last commit has a dependency on:
https://patchwork.kernel.org/project/linux-mediatek/patch/1622011927-359-9-git-send-email-hsin-hsiung.wang@mediatek.com/

Fabien Parent (7):
  dt-bindings: input: mtk-pmic-keys: add MT6359 binding definition
  mfd: add missing defines necessary for mtk-pmic-keys support
  mfd: mt6397-core: add resources for PMIC keys for MT6359
  Input: mtk-pmic-keys: rename platform data struct
  Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs
  Input: keyboard: mtk-pmic-keys: add support for MT6359
  arm64: dts: mediatek: mt6359: add node for PMIC keys support

 .../bindings/input/mtk-pmic-keys.txt          |  1 +
 arch/arm64/boot/dts/mediatek/mt6359.dtsi      | 15 +++++++
 drivers/input/keyboard/mtk-pmic-keys.c        | 41 +++++++++++++------
 drivers/mfd/mt6397-core.c                     | 13 ++++++
 include/linux/mfd/mt6359/registers.h          |  2 +
 5 files changed, 60 insertions(+), 12 deletions(-)

-- 
2.35.2


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

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 1/7] dt-bindings: input: mtk-pmic-keys: add MT6359 binding definition
  2022-04-15 15:36 ` Fabien Parent
  (?)
@ 2022-04-15 15:36   ` Fabien Parent
  -1 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: Fabien Parent, linux-input, devicetree, linux-arm-kernel,
	linux-mediatek, linux-kernel

Add binding definition for the support of the MT6359 keyboard driver.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 Documentation/devicetree/bindings/input/mtk-pmic-keys.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
index 9d00f2a8e13a..afe9062a4dc7 100644
--- a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
+++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
@@ -13,6 +13,7 @@ Required properties:
 	- "mediatek,mt6397-keys"
 	- "mediatek,mt6323-keys"
 	- "mediatek,mt6358-keys"
+	- "mediatek,mt6359-keys"
 - linux,keycodes: See Documentation/devicetree/bindings/input/input.yaml
 
 Optional Properties:
-- 
2.35.2


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 1/7] dt-bindings: input: mtk-pmic-keys: add MT6359 binding definition
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: Fabien Parent, linux-input, devicetree, linux-arm-kernel,
	linux-mediatek, linux-kernel

Add binding definition for the support of the MT6359 keyboard driver.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 Documentation/devicetree/bindings/input/mtk-pmic-keys.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
index 9d00f2a8e13a..afe9062a4dc7 100644
--- a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
+++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
@@ -13,6 +13,7 @@ Required properties:
 	- "mediatek,mt6397-keys"
 	- "mediatek,mt6323-keys"
 	- "mediatek,mt6358-keys"
+	- "mediatek,mt6359-keys"
 - linux,keycodes: See Documentation/devicetree/bindings/input/input.yaml
 
 Optional Properties:
-- 
2.35.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 1/7] dt-bindings: input: mtk-pmic-keys: add MT6359 binding definition
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: Fabien Parent, linux-input, devicetree, linux-arm-kernel,
	linux-mediatek, linux-kernel

Add binding definition for the support of the MT6359 keyboard driver.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 Documentation/devicetree/bindings/input/mtk-pmic-keys.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
index 9d00f2a8e13a..afe9062a4dc7 100644
--- a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
+++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
@@ -13,6 +13,7 @@ Required properties:
 	- "mediatek,mt6397-keys"
 	- "mediatek,mt6323-keys"
 	- "mediatek,mt6358-keys"
+	- "mediatek,mt6359-keys"
 - linux,keycodes: See Documentation/devicetree/bindings/input/input.yaml
 
 Optional Properties:
-- 
2.35.2


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

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 2/7] mfd: add missing defines necessary for mtk-pmic-keys support
  2022-04-15 15:36 ` Fabien Parent
  (?)
@ 2022-04-15 15:36   ` Fabien Parent
  -1 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Lee Jones, Matthias Brugger
  Cc: Fabien Parent, linux-arm-kernel, linux-mediatek, linux-kernel

Add 2 missing MT6359 registers that are needed to implement
the keyboard driver.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 include/linux/mfd/mt6359/registers.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/mfd/mt6359/registers.h b/include/linux/mfd/mt6359/registers.h
index 2135c9695918..2a4394a27b1c 100644
--- a/include/linux/mfd/mt6359/registers.h
+++ b/include/linux/mfd/mt6359/registers.h
@@ -8,6 +8,8 @@
 
 /* PMIC Registers */
 #define MT6359_SWCID                         0xa
+#define MT6359_TOPSTATUS                     0x2a
+#define MT6359_TOP_RST_MISC                  0x14c
 #define MT6359_MISC_TOP_INT_CON0             0x188
 #define MT6359_MISC_TOP_INT_STATUS0          0x194
 #define MT6359_TOP_INT_STATUS0               0x19e
-- 
2.35.2


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 2/7] mfd: add missing defines necessary for mtk-pmic-keys support
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Lee Jones, Matthias Brugger
  Cc: Fabien Parent, linux-arm-kernel, linux-mediatek, linux-kernel

Add 2 missing MT6359 registers that are needed to implement
the keyboard driver.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 include/linux/mfd/mt6359/registers.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/mfd/mt6359/registers.h b/include/linux/mfd/mt6359/registers.h
index 2135c9695918..2a4394a27b1c 100644
--- a/include/linux/mfd/mt6359/registers.h
+++ b/include/linux/mfd/mt6359/registers.h
@@ -8,6 +8,8 @@
 
 /* PMIC Registers */
 #define MT6359_SWCID                         0xa
+#define MT6359_TOPSTATUS                     0x2a
+#define MT6359_TOP_RST_MISC                  0x14c
 #define MT6359_MISC_TOP_INT_CON0             0x188
 #define MT6359_MISC_TOP_INT_STATUS0          0x194
 #define MT6359_TOP_INT_STATUS0               0x19e
-- 
2.35.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 2/7] mfd: add missing defines necessary for mtk-pmic-keys support
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Lee Jones, Matthias Brugger
  Cc: Fabien Parent, linux-arm-kernel, linux-mediatek, linux-kernel

Add 2 missing MT6359 registers that are needed to implement
the keyboard driver.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 include/linux/mfd/mt6359/registers.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/mfd/mt6359/registers.h b/include/linux/mfd/mt6359/registers.h
index 2135c9695918..2a4394a27b1c 100644
--- a/include/linux/mfd/mt6359/registers.h
+++ b/include/linux/mfd/mt6359/registers.h
@@ -8,6 +8,8 @@
 
 /* PMIC Registers */
 #define MT6359_SWCID                         0xa
+#define MT6359_TOPSTATUS                     0x2a
+#define MT6359_TOP_RST_MISC                  0x14c
 #define MT6359_MISC_TOP_INT_CON0             0x188
 #define MT6359_MISC_TOP_INT_STATUS0          0x194
 #define MT6359_TOP_INT_STATUS0               0x19e
-- 
2.35.2


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

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 3/7] mfd: mt6397-core: add resources for PMIC keys for MT6359
  2022-04-15 15:36 ` Fabien Parent
  (?)
@ 2022-04-15 15:36   ` Fabien Parent
  -1 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Lee Jones, Matthias Brugger
  Cc: Fabien Parent, linux-arm-kernel, linux-mediatek, linux-kernel

Add the MFD resources in order to be able to probe and use the keyboard
driver for the MT6359 PMIC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/mfd/mt6397-core.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index bddb40054b9e..1a368ad08f58 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -54,6 +54,13 @@ static const struct resource mt6358_keys_resources[] = {
 	DEFINE_RES_IRQ_NAMED(MT6358_IRQ_HOMEKEY_R, "homekey_r"),
 };
 
+static const struct resource mt6359_keys_resources[] = {
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_PWRKEY, "powerkey"),
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY, "homekey"),
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_PWRKEY_R, "powerkey_r"),
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY_R, "homekey_r"),
+};
+
 static const struct resource mt6323_keys_resources[] = {
 	DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_PWRKEY, "powerkey"),
 	DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_FCHRKEY, "homekey"),
@@ -122,6 +129,12 @@ static const struct mfd_cell mt6359_devs[] = {
 		.of_compatible = "mediatek,mt6358-rtc",
 	},
 	{ .name = "mt6359-sound", },
+	{
+		.name = "mtk-pmic-keys",
+		.num_resources = ARRAY_SIZE(mt6359_keys_resources),
+		.resources = mt6359_keys_resources,
+		.of_compatible = "mediatek,mt6359-keys"
+	},
 };
 
 static const struct mfd_cell mt6397_devs[] = {
-- 
2.35.2


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 3/7] mfd: mt6397-core: add resources for PMIC keys for MT6359
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Lee Jones, Matthias Brugger
  Cc: Fabien Parent, linux-arm-kernel, linux-mediatek, linux-kernel

Add the MFD resources in order to be able to probe and use the keyboard
driver for the MT6359 PMIC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/mfd/mt6397-core.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index bddb40054b9e..1a368ad08f58 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -54,6 +54,13 @@ static const struct resource mt6358_keys_resources[] = {
 	DEFINE_RES_IRQ_NAMED(MT6358_IRQ_HOMEKEY_R, "homekey_r"),
 };
 
+static const struct resource mt6359_keys_resources[] = {
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_PWRKEY, "powerkey"),
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY, "homekey"),
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_PWRKEY_R, "powerkey_r"),
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY_R, "homekey_r"),
+};
+
 static const struct resource mt6323_keys_resources[] = {
 	DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_PWRKEY, "powerkey"),
 	DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_FCHRKEY, "homekey"),
@@ -122,6 +129,12 @@ static const struct mfd_cell mt6359_devs[] = {
 		.of_compatible = "mediatek,mt6358-rtc",
 	},
 	{ .name = "mt6359-sound", },
+	{
+		.name = "mtk-pmic-keys",
+		.num_resources = ARRAY_SIZE(mt6359_keys_resources),
+		.resources = mt6359_keys_resources,
+		.of_compatible = "mediatek,mt6359-keys"
+	},
 };
 
 static const struct mfd_cell mt6397_devs[] = {
-- 
2.35.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 3/7] mfd: mt6397-core: add resources for PMIC keys for MT6359
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Lee Jones, Matthias Brugger
  Cc: Fabien Parent, linux-arm-kernel, linux-mediatek, linux-kernel

Add the MFD resources in order to be able to probe and use the keyboard
driver for the MT6359 PMIC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/mfd/mt6397-core.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index bddb40054b9e..1a368ad08f58 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -54,6 +54,13 @@ static const struct resource mt6358_keys_resources[] = {
 	DEFINE_RES_IRQ_NAMED(MT6358_IRQ_HOMEKEY_R, "homekey_r"),
 };
 
+static const struct resource mt6359_keys_resources[] = {
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_PWRKEY, "powerkey"),
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY, "homekey"),
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_PWRKEY_R, "powerkey_r"),
+	DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY_R, "homekey_r"),
+};
+
 static const struct resource mt6323_keys_resources[] = {
 	DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_PWRKEY, "powerkey"),
 	DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_FCHRKEY, "homekey"),
@@ -122,6 +129,12 @@ static const struct mfd_cell mt6359_devs[] = {
 		.of_compatible = "mediatek,mt6358-rtc",
 	},
 	{ .name = "mt6359-sound", },
+	{
+		.name = "mtk-pmic-keys",
+		.num_resources = ARRAY_SIZE(mt6359_keys_resources),
+		.resources = mt6359_keys_resources,
+		.of_compatible = "mediatek,mt6359-keys"
+	},
 };
 
 static const struct mfd_cell mt6397_devs[] = {
-- 
2.35.2


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

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 4/7] Input: mtk-pmic-keys: rename platform data struct
  2022-04-15 15:36 ` Fabien Parent
  (?)
@ 2022-04-15 15:36   ` Fabien Parent
  -1 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

Rename the struct that is given to the .data field of the of_device_id
entries to reflect that this structure will not only contain register
definitions but also other platform data.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/input/keyboard/mtk-pmic-keys.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
index c31ab4368388..a0da644fe93d 100644
--- a/drivers/input/keyboard/mtk-pmic-keys.c
+++ b/drivers/input/keyboard/mtk-pmic-keys.c
@@ -50,12 +50,12 @@ struct mtk_pmic_keys_regs {
 	.intsel_mask		= _intsel_mask,		\
 }
 
-struct mtk_pmic_regs {
+struct mtk_pmic_keys_pdata {
 	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
 	u32 pmic_rst_reg;
 };
 
-static const struct mtk_pmic_regs mt6397_regs = {
+static const struct mtk_pmic_keys_pdata mt6397_pdata = {
 	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
 		MTK_PMIC_KEYS_REGS(MT6397_CHRSTATUS,
 		0x8, MT6397_INT_RSV, 0x10),
@@ -65,7 +65,7 @@ static const struct mtk_pmic_regs mt6397_regs = {
 	.pmic_rst_reg = MT6397_TOP_RST_MISC,
 };
 
-static const struct mtk_pmic_regs mt6323_regs = {
+static const struct mtk_pmic_keys_pdata mt6323_pdata = {
 	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
 		MTK_PMIC_KEYS_REGS(MT6323_CHRSTATUS,
 		0x2, MT6323_INT_MISC_CON, 0x10),
@@ -75,7 +75,7 @@ static const struct mtk_pmic_regs mt6323_regs = {
 	.pmic_rst_reg = MT6323_TOP_RST_MISC,
 };
 
-static const struct mtk_pmic_regs mt6358_regs = {
+static const struct mtk_pmic_keys_pdata mt6358_pdata = {
 	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
 		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
 				   0x2, MT6358_PSC_TOP_INT_CON0, 0x5),
@@ -255,13 +255,13 @@ static SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend,
 static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
 	{
 		.compatible = "mediatek,mt6397-keys",
-		.data = &mt6397_regs,
+		.data = &mt6397_pdata,
 	}, {
 		.compatible = "mediatek,mt6323-keys",
-		.data = &mt6323_regs,
+		.data = &mt6323_pdata,
 	}, {
 		.compatible = "mediatek,mt6358-keys",
-		.data = &mt6358_regs,
+		.data = &mt6358_pdata,
 	}, {
 		/* sentinel */
 	}
@@ -277,7 +277,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 	static const char *const irqnames[] = { "powerkey", "homekey" };
 	static const char *const irqnames_r[] = { "powerkey_r", "homekey_r" };
 	struct mtk_pmic_keys *keys;
-	const struct mtk_pmic_regs *mtk_pmic_regs;
+	const struct mtk_pmic_keys_pdata *mtk_pmic_keys_pdata;
 	struct input_dev *input_dev;
 	const struct of_device_id *of_id =
 		of_match_device(of_mtk_pmic_keys_match_tbl, &pdev->dev);
@@ -288,7 +288,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 
 	keys->dev = &pdev->dev;
 	keys->regmap = pmic_chip->regmap;
-	mtk_pmic_regs = of_id->data;
+	mtk_pmic_keys_pdata = of_id->data;
 
 	keys->input_dev = input_dev = devm_input_allocate_device(keys->dev);
 	if (!input_dev) {
@@ -310,7 +310,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 	}
 
 	for_each_child_of_node(node, child) {
-		keys->keys[index].regs = &mtk_pmic_regs->keys_regs[index];
+		keys->keys[index].regs = &mtk_pmic_keys_pdata->keys_regs[index];
 
 		keys->keys[index].irq =
 			platform_get_irq_byname(pdev, irqnames[index]);
@@ -358,7 +358,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 		return error;
 	}
 
-	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_regs->pmic_rst_reg);
+	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_keys_pdata->pmic_rst_reg);
 
 	platform_set_drvdata(pdev, keys);
 
-- 
2.35.2


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 4/7] Input: mtk-pmic-keys: rename platform data struct
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

Rename the struct that is given to the .data field of the of_device_id
entries to reflect that this structure will not only contain register
definitions but also other platform data.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/input/keyboard/mtk-pmic-keys.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
index c31ab4368388..a0da644fe93d 100644
--- a/drivers/input/keyboard/mtk-pmic-keys.c
+++ b/drivers/input/keyboard/mtk-pmic-keys.c
@@ -50,12 +50,12 @@ struct mtk_pmic_keys_regs {
 	.intsel_mask		= _intsel_mask,		\
 }
 
-struct mtk_pmic_regs {
+struct mtk_pmic_keys_pdata {
 	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
 	u32 pmic_rst_reg;
 };
 
-static const struct mtk_pmic_regs mt6397_regs = {
+static const struct mtk_pmic_keys_pdata mt6397_pdata = {
 	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
 		MTK_PMIC_KEYS_REGS(MT6397_CHRSTATUS,
 		0x8, MT6397_INT_RSV, 0x10),
@@ -65,7 +65,7 @@ static const struct mtk_pmic_regs mt6397_regs = {
 	.pmic_rst_reg = MT6397_TOP_RST_MISC,
 };
 
-static const struct mtk_pmic_regs mt6323_regs = {
+static const struct mtk_pmic_keys_pdata mt6323_pdata = {
 	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
 		MTK_PMIC_KEYS_REGS(MT6323_CHRSTATUS,
 		0x2, MT6323_INT_MISC_CON, 0x10),
@@ -75,7 +75,7 @@ static const struct mtk_pmic_regs mt6323_regs = {
 	.pmic_rst_reg = MT6323_TOP_RST_MISC,
 };
 
-static const struct mtk_pmic_regs mt6358_regs = {
+static const struct mtk_pmic_keys_pdata mt6358_pdata = {
 	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
 		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
 				   0x2, MT6358_PSC_TOP_INT_CON0, 0x5),
@@ -255,13 +255,13 @@ static SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend,
 static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
 	{
 		.compatible = "mediatek,mt6397-keys",
-		.data = &mt6397_regs,
+		.data = &mt6397_pdata,
 	}, {
 		.compatible = "mediatek,mt6323-keys",
-		.data = &mt6323_regs,
+		.data = &mt6323_pdata,
 	}, {
 		.compatible = "mediatek,mt6358-keys",
-		.data = &mt6358_regs,
+		.data = &mt6358_pdata,
 	}, {
 		/* sentinel */
 	}
@@ -277,7 +277,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 	static const char *const irqnames[] = { "powerkey", "homekey" };
 	static const char *const irqnames_r[] = { "powerkey_r", "homekey_r" };
 	struct mtk_pmic_keys *keys;
-	const struct mtk_pmic_regs *mtk_pmic_regs;
+	const struct mtk_pmic_keys_pdata *mtk_pmic_keys_pdata;
 	struct input_dev *input_dev;
 	const struct of_device_id *of_id =
 		of_match_device(of_mtk_pmic_keys_match_tbl, &pdev->dev);
@@ -288,7 +288,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 
 	keys->dev = &pdev->dev;
 	keys->regmap = pmic_chip->regmap;
-	mtk_pmic_regs = of_id->data;
+	mtk_pmic_keys_pdata = of_id->data;
 
 	keys->input_dev = input_dev = devm_input_allocate_device(keys->dev);
 	if (!input_dev) {
@@ -310,7 +310,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 	}
 
 	for_each_child_of_node(node, child) {
-		keys->keys[index].regs = &mtk_pmic_regs->keys_regs[index];
+		keys->keys[index].regs = &mtk_pmic_keys_pdata->keys_regs[index];
 
 		keys->keys[index].irq =
 			platform_get_irq_byname(pdev, irqnames[index]);
@@ -358,7 +358,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 		return error;
 	}
 
-	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_regs->pmic_rst_reg);
+	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_keys_pdata->pmic_rst_reg);
 
 	platform_set_drvdata(pdev, keys);
 
-- 
2.35.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 4/7] Input: mtk-pmic-keys: rename platform data struct
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

Rename the struct that is given to the .data field of the of_device_id
entries to reflect that this structure will not only contain register
definitions but also other platform data.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/input/keyboard/mtk-pmic-keys.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
index c31ab4368388..a0da644fe93d 100644
--- a/drivers/input/keyboard/mtk-pmic-keys.c
+++ b/drivers/input/keyboard/mtk-pmic-keys.c
@@ -50,12 +50,12 @@ struct mtk_pmic_keys_regs {
 	.intsel_mask		= _intsel_mask,		\
 }
 
-struct mtk_pmic_regs {
+struct mtk_pmic_keys_pdata {
 	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
 	u32 pmic_rst_reg;
 };
 
-static const struct mtk_pmic_regs mt6397_regs = {
+static const struct mtk_pmic_keys_pdata mt6397_pdata = {
 	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
 		MTK_PMIC_KEYS_REGS(MT6397_CHRSTATUS,
 		0x8, MT6397_INT_RSV, 0x10),
@@ -65,7 +65,7 @@ static const struct mtk_pmic_regs mt6397_regs = {
 	.pmic_rst_reg = MT6397_TOP_RST_MISC,
 };
 
-static const struct mtk_pmic_regs mt6323_regs = {
+static const struct mtk_pmic_keys_pdata mt6323_pdata = {
 	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
 		MTK_PMIC_KEYS_REGS(MT6323_CHRSTATUS,
 		0x2, MT6323_INT_MISC_CON, 0x10),
@@ -75,7 +75,7 @@ static const struct mtk_pmic_regs mt6323_regs = {
 	.pmic_rst_reg = MT6323_TOP_RST_MISC,
 };
 
-static const struct mtk_pmic_regs mt6358_regs = {
+static const struct mtk_pmic_keys_pdata mt6358_pdata = {
 	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
 		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
 				   0x2, MT6358_PSC_TOP_INT_CON0, 0x5),
@@ -255,13 +255,13 @@ static SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend,
 static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
 	{
 		.compatible = "mediatek,mt6397-keys",
-		.data = &mt6397_regs,
+		.data = &mt6397_pdata,
 	}, {
 		.compatible = "mediatek,mt6323-keys",
-		.data = &mt6323_regs,
+		.data = &mt6323_pdata,
 	}, {
 		.compatible = "mediatek,mt6358-keys",
-		.data = &mt6358_regs,
+		.data = &mt6358_pdata,
 	}, {
 		/* sentinel */
 	}
@@ -277,7 +277,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 	static const char *const irqnames[] = { "powerkey", "homekey" };
 	static const char *const irqnames_r[] = { "powerkey_r", "homekey_r" };
 	struct mtk_pmic_keys *keys;
-	const struct mtk_pmic_regs *mtk_pmic_regs;
+	const struct mtk_pmic_keys_pdata *mtk_pmic_keys_pdata;
 	struct input_dev *input_dev;
 	const struct of_device_id *of_id =
 		of_match_device(of_mtk_pmic_keys_match_tbl, &pdev->dev);
@@ -288,7 +288,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 
 	keys->dev = &pdev->dev;
 	keys->regmap = pmic_chip->regmap;
-	mtk_pmic_regs = of_id->data;
+	mtk_pmic_keys_pdata = of_id->data;
 
 	keys->input_dev = input_dev = devm_input_allocate_device(keys->dev);
 	if (!input_dev) {
@@ -310,7 +310,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 	}
 
 	for_each_child_of_node(node, child) {
-		keys->keys[index].regs = &mtk_pmic_regs->keys_regs[index];
+		keys->keys[index].regs = &mtk_pmic_keys_pdata->keys_regs[index];
 
 		keys->keys[index].irq =
 			platform_get_irq_byname(pdev, irqnames[index]);
@@ -358,7 +358,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 		return error;
 	}
 
-	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_regs->pmic_rst_reg);
+	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_keys_pdata->pmic_rst_reg);
 
 	platform_set_drvdata(pdev, keys);
 
-- 
2.35.2


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

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 5/7] Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs
  2022-04-15 15:36 ` Fabien Parent
  (?)
@ 2022-04-15 15:36   ` Fabien Parent
  -1 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

The MT6358 PMIC is not the only PMIC to have release IRQs. In order to
support more PMIC that supports release IRQs, such as MT6357, MT6359,
and possibly others, let's add some field in the platform data to
indicate whether a PMIC support release keys.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/input/keyboard/mtk-pmic-keys.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
index a0da644fe93d..609b87afd020 100644
--- a/drivers/input/keyboard/mtk-pmic-keys.c
+++ b/drivers/input/keyboard/mtk-pmic-keys.c
@@ -53,6 +53,7 @@ struct mtk_pmic_keys_regs {
 struct mtk_pmic_keys_pdata {
 	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
 	u32 pmic_rst_reg;
+	bool has_key_release_irqs;
 };
 
 static const struct mtk_pmic_keys_pdata mt6397_pdata = {
@@ -83,6 +84,7 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = {
 		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
 				   0x8, MT6358_PSC_TOP_INT_CON0, 0xa),
 	.pmic_rst_reg = MT6358_TOP_RST_MISC,
+	.has_key_release_irqs = true,
 };
 
 struct mtk_pmic_keys_info {
@@ -319,7 +321,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 			return keys->keys[index].irq;
 		}
 
-		if (of_device_is_compatible(node, "mediatek,mt6358-keys")) {
+		if (mtk_pmic_keys_pdata->has_key_release_irqs) {
 			keys->keys[index].irq_r = platform_get_irq_byname(pdev,
 									  irqnames_r[index]);
 
-- 
2.35.2


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 5/7] Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

The MT6358 PMIC is not the only PMIC to have release IRQs. In order to
support more PMIC that supports release IRQs, such as MT6357, MT6359,
and possibly others, let's add some field in the platform data to
indicate whether a PMIC support release keys.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/input/keyboard/mtk-pmic-keys.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
index a0da644fe93d..609b87afd020 100644
--- a/drivers/input/keyboard/mtk-pmic-keys.c
+++ b/drivers/input/keyboard/mtk-pmic-keys.c
@@ -53,6 +53,7 @@ struct mtk_pmic_keys_regs {
 struct mtk_pmic_keys_pdata {
 	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
 	u32 pmic_rst_reg;
+	bool has_key_release_irqs;
 };
 
 static const struct mtk_pmic_keys_pdata mt6397_pdata = {
@@ -83,6 +84,7 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = {
 		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
 				   0x8, MT6358_PSC_TOP_INT_CON0, 0xa),
 	.pmic_rst_reg = MT6358_TOP_RST_MISC,
+	.has_key_release_irqs = true,
 };
 
 struct mtk_pmic_keys_info {
@@ -319,7 +321,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 			return keys->keys[index].irq;
 		}
 
-		if (of_device_is_compatible(node, "mediatek,mt6358-keys")) {
+		if (mtk_pmic_keys_pdata->has_key_release_irqs) {
 			keys->keys[index].irq_r = platform_get_irq_byname(pdev,
 									  irqnames_r[index]);
 
-- 
2.35.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 5/7] Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

The MT6358 PMIC is not the only PMIC to have release IRQs. In order to
support more PMIC that supports release IRQs, such as MT6357, MT6359,
and possibly others, let's add some field in the platform data to
indicate whether a PMIC support release keys.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/input/keyboard/mtk-pmic-keys.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
index a0da644fe93d..609b87afd020 100644
--- a/drivers/input/keyboard/mtk-pmic-keys.c
+++ b/drivers/input/keyboard/mtk-pmic-keys.c
@@ -53,6 +53,7 @@ struct mtk_pmic_keys_regs {
 struct mtk_pmic_keys_pdata {
 	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
 	u32 pmic_rst_reg;
+	bool has_key_release_irqs;
 };
 
 static const struct mtk_pmic_keys_pdata mt6397_pdata = {
@@ -83,6 +84,7 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = {
 		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
 				   0x8, MT6358_PSC_TOP_INT_CON0, 0xa),
 	.pmic_rst_reg = MT6358_TOP_RST_MISC,
+	.has_key_release_irqs = true,
 };
 
 struct mtk_pmic_keys_info {
@@ -319,7 +321,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
 			return keys->keys[index].irq;
 		}
 
-		if (of_device_is_compatible(node, "mediatek,mt6358-keys")) {
+		if (mtk_pmic_keys_pdata->has_key_release_irqs) {
 			keys->keys[index].irq_r = platform_get_irq_byname(pdev,
 									  irqnames_r[index]);
 
-- 
2.35.2


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

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 6/7] Input: keyboard: mtk-pmic-keys: add support for MT6359
  2022-04-15 15:36 ` Fabien Parent
  (?)
@ 2022-04-15 15:36   ` Fabien Parent
  -1 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

Add support for the MT6359 PMIC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/input/keyboard/mtk-pmic-keys.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
index 609b87afd020..115ed4aaae81 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/mt6358/registers.h>
+#include <linux/mfd/mt6359/registers.h>
 #include <linux/mfd/mt6397/core.h>
 #include <linux/mfd/mt6397/registers.h>
 #include <linux/module.h>
@@ -87,6 +88,17 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = {
 	.has_key_release_irqs = true,
 };
 
+static const struct mtk_pmic_keys_pdata mt6359_pdata = {
+	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
+		MTK_PMIC_KEYS_REGS(MT6359_TOPSTATUS,
+		0x2, MT6359_PSC_TOP_INT_CON0, 0x5),
+	.keys_regs[MTK_PMIC_HOMEKEY_INDEX] =
+		MTK_PMIC_KEYS_REGS(MT6359_TOPSTATUS,
+		0x8, MT6359_PSC_TOP_INT_CON0, 0xa),
+	.pmic_rst_reg = MT6359_TOP_RST_MISC,
+	.has_key_release_irqs = true,
+};
+
 struct mtk_pmic_keys_info {
 	struct mtk_pmic_keys *keys;
 	const struct mtk_pmic_keys_regs *regs;
@@ -264,6 +276,9 @@ static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
 	}, {
 		.compatible = "mediatek,mt6358-keys",
 		.data = &mt6358_pdata,
+	}, {
+		.compatible = "mediatek,mt6359-keys",
+		.data = &mt6359_pdata,
 	}, {
 		/* sentinel */
 	}
-- 
2.35.2


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 6/7] Input: keyboard: mtk-pmic-keys: add support for MT6359
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

Add support for the MT6359 PMIC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/input/keyboard/mtk-pmic-keys.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
index 609b87afd020..115ed4aaae81 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/mt6358/registers.h>
+#include <linux/mfd/mt6359/registers.h>
 #include <linux/mfd/mt6397/core.h>
 #include <linux/mfd/mt6397/registers.h>
 #include <linux/module.h>
@@ -87,6 +88,17 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = {
 	.has_key_release_irqs = true,
 };
 
+static const struct mtk_pmic_keys_pdata mt6359_pdata = {
+	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
+		MTK_PMIC_KEYS_REGS(MT6359_TOPSTATUS,
+		0x2, MT6359_PSC_TOP_INT_CON0, 0x5),
+	.keys_regs[MTK_PMIC_HOMEKEY_INDEX] =
+		MTK_PMIC_KEYS_REGS(MT6359_TOPSTATUS,
+		0x8, MT6359_PSC_TOP_INT_CON0, 0xa),
+	.pmic_rst_reg = MT6359_TOP_RST_MISC,
+	.has_key_release_irqs = true,
+};
+
 struct mtk_pmic_keys_info {
 	struct mtk_pmic_keys *keys;
 	const struct mtk_pmic_keys_regs *regs;
@@ -264,6 +276,9 @@ static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
 	}, {
 		.compatible = "mediatek,mt6358-keys",
 		.data = &mt6358_pdata,
+	}, {
+		.compatible = "mediatek,mt6359-keys",
+		.data = &mt6359_pdata,
 	}, {
 		/* sentinel */
 	}
-- 
2.35.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 6/7] Input: keyboard: mtk-pmic-keys: add support for MT6359
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

Add support for the MT6359 PMIC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/input/keyboard/mtk-pmic-keys.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
index 609b87afd020..115ed4aaae81 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/mt6358/registers.h>
+#include <linux/mfd/mt6359/registers.h>
 #include <linux/mfd/mt6397/core.h>
 #include <linux/mfd/mt6397/registers.h>
 #include <linux/module.h>
@@ -87,6 +88,17 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = {
 	.has_key_release_irqs = true,
 };
 
+static const struct mtk_pmic_keys_pdata mt6359_pdata = {
+	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
+		MTK_PMIC_KEYS_REGS(MT6359_TOPSTATUS,
+		0x2, MT6359_PSC_TOP_INT_CON0, 0x5),
+	.keys_regs[MTK_PMIC_HOMEKEY_INDEX] =
+		MTK_PMIC_KEYS_REGS(MT6359_TOPSTATUS,
+		0x8, MT6359_PSC_TOP_INT_CON0, 0xa),
+	.pmic_rst_reg = MT6359_TOP_RST_MISC,
+	.has_key_release_irqs = true,
+};
+
 struct mtk_pmic_keys_info {
 	struct mtk_pmic_keys *keys;
 	const struct mtk_pmic_keys_regs *regs;
@@ -264,6 +276,9 @@ static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
 	}, {
 		.compatible = "mediatek,mt6358-keys",
 		.data = &mt6358_pdata,
+	}, {
+		.compatible = "mediatek,mt6359-keys",
+		.data = &mt6359_pdata,
 	}, {
 		/* sentinel */
 	}
-- 
2.35.2


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

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 7/7] arm64: dts: mediatek: mt6359: add node for PMIC keys support
  2022-04-15 15:36 ` Fabien Parent
  (?)
@ 2022-04-15 15:36   ` Fabien Parent
  -1 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: Fabien Parent, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel

Add node for the MT6359 PMIC keyboard in mt6359.dtsi.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
Dependency on: 
https://patchwork.kernel.org/project/linux-mediatek/patch/1622011927-359-9-git-send-email-hsin-hsiung.wang@mediatek.com/

 arch/arm64/boot/dts/mediatek/mt6359.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6359.dtsi b/arch/arm64/boot/dts/mediatek/mt6359.dtsi
index 18c0d5325c22..dcafe1ff23ae 100644
--- a/arch/arm64/boot/dts/mediatek/mt6359.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6359.dtsi
@@ -3,6 +3,8 @@
  * Copyright (c) 2021 MediaTek Inc.
  */
 
+#include <dt-bindings/input/input.h>
+
 &pwrap {
 	pmic: pmic {
 		compatible = "mediatek,mt6359";
@@ -294,5 +296,18 @@ mt6359_vsram_others_sshub_ldo: ldo_vsram_others_sshub {
 		mt6359rtc: mt6359rtc {
 			compatible = "mediatek,mt6358-rtc";
 		};
+
+		mt6359keys: keyboard {
+			compatible = "mediatek,mt6359-keys";
+
+			key-0 {
+				linux,keycodes = <KEY_POWER>;
+				wakeup-source;
+			};
+
+			key-1 {
+				linux,keycodes = <KEY_HOME>;
+			};
+		};
 	};
 };
-- 
2.35.2


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 7/7] arm64: dts: mediatek: mt6359: add node for PMIC keys support
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: Fabien Parent, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel

Add node for the MT6359 PMIC keyboard in mt6359.dtsi.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
Dependency on: 
https://patchwork.kernel.org/project/linux-mediatek/patch/1622011927-359-9-git-send-email-hsin-hsiung.wang@mediatek.com/

 arch/arm64/boot/dts/mediatek/mt6359.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6359.dtsi b/arch/arm64/boot/dts/mediatek/mt6359.dtsi
index 18c0d5325c22..dcafe1ff23ae 100644
--- a/arch/arm64/boot/dts/mediatek/mt6359.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6359.dtsi
@@ -3,6 +3,8 @@
  * Copyright (c) 2021 MediaTek Inc.
  */
 
+#include <dt-bindings/input/input.h>
+
 &pwrap {
 	pmic: pmic {
 		compatible = "mediatek,mt6359";
@@ -294,5 +296,18 @@ mt6359_vsram_others_sshub_ldo: ldo_vsram_others_sshub {
 		mt6359rtc: mt6359rtc {
 			compatible = "mediatek,mt6358-rtc";
 		};
+
+		mt6359keys: keyboard {
+			compatible = "mediatek,mt6359-keys";
+
+			key-0 {
+				linux,keycodes = <KEY_POWER>;
+				wakeup-source;
+			};
+
+			key-1 {
+				linux,keycodes = <KEY_HOME>;
+			};
+		};
 	};
 };
-- 
2.35.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 7/7] arm64: dts: mediatek: mt6359: add node for PMIC keys support
@ 2022-04-15 15:36   ` Fabien Parent
  0 siblings, 0 replies; 38+ messages in thread
From: Fabien Parent @ 2022-04-15 15:36 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: Fabien Parent, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel

Add node for the MT6359 PMIC keyboard in mt6359.dtsi.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
Dependency on: 
https://patchwork.kernel.org/project/linux-mediatek/patch/1622011927-359-9-git-send-email-hsin-hsiung.wang@mediatek.com/

 arch/arm64/boot/dts/mediatek/mt6359.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6359.dtsi b/arch/arm64/boot/dts/mediatek/mt6359.dtsi
index 18c0d5325c22..dcafe1ff23ae 100644
--- a/arch/arm64/boot/dts/mediatek/mt6359.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6359.dtsi
@@ -3,6 +3,8 @@
  * Copyright (c) 2021 MediaTek Inc.
  */
 
+#include <dt-bindings/input/input.h>
+
 &pwrap {
 	pmic: pmic {
 		compatible = "mediatek,mt6359";
@@ -294,5 +296,18 @@ mt6359_vsram_others_sshub_ldo: ldo_vsram_others_sshub {
 		mt6359rtc: mt6359rtc {
 			compatible = "mediatek,mt6358-rtc";
 		};
+
+		mt6359keys: keyboard {
+			compatible = "mediatek,mt6359-keys";
+
+			key-0 {
+				linux,keycodes = <KEY_POWER>;
+				wakeup-source;
+			};
+
+			key-1 {
+				linux,keycodes = <KEY_HOME>;
+			};
+		};
 	};
 };
-- 
2.35.2


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

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* Re: [PATCH 7/7] arm64: dts: mediatek: mt6359: add node for PMIC keys support
  2022-04-15 15:36   ` Fabien Parent
  (?)
@ 2022-04-21 10:33     ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-21 10:33 UTC (permalink / raw)
  To: Fabien Parent, Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: devicetree, linux-arm-kernel, linux-mediatek, linux-kernel

Il 15/04/22 17:36, Fabien Parent ha scritto:
> Add node for the MT6359 PMIC keyboard in mt6359.dtsi.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Hello Fabien,
I agree that all MT6359 PMICs do support pmic-keys, but not all devices using
this PMIC have physical keys connected to that.

Besides, even if all of them did, it wouldn't be guaranteed that key-0 would be
always KEY_POWER, as much as it wouldn't be guaranteed that key-1 would be always
KEY_HOME.

In my opinion, it *is* correct to add mediatek,mt6359-keys to the PMIC dtsi, but
you should do that without declaring any key, hence it's enough to do:

		mt6359_keys: mtk-pmic-keys {
			compatible = "mediatek,mt6359-keys";
		};

... then, any machine that *actually does* have these keys connected and manageable
in Linux should declare its own keys in its own dts/dtsi.

Of course, this means that you'll have to remove your input.h inclusion as well.

Regards,
Angelo


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 7/7] arm64: dts: mediatek: mt6359: add node for PMIC keys support
@ 2022-04-21 10:33     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-21 10:33 UTC (permalink / raw)
  To: Fabien Parent, Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: devicetree, linux-arm-kernel, linux-mediatek, linux-kernel

Il 15/04/22 17:36, Fabien Parent ha scritto:
> Add node for the MT6359 PMIC keyboard in mt6359.dtsi.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Hello Fabien,
I agree that all MT6359 PMICs do support pmic-keys, but not all devices using
this PMIC have physical keys connected to that.

Besides, even if all of them did, it wouldn't be guaranteed that key-0 would be
always KEY_POWER, as much as it wouldn't be guaranteed that key-1 would be always
KEY_HOME.

In my opinion, it *is* correct to add mediatek,mt6359-keys to the PMIC dtsi, but
you should do that without declaring any key, hence it's enough to do:

		mt6359_keys: mtk-pmic-keys {
			compatible = "mediatek,mt6359-keys";
		};

... then, any machine that *actually does* have these keys connected and manageable
in Linux should declare its own keys in its own dts/dtsi.

Of course, this means that you'll have to remove your input.h inclusion as well.

Regards,
Angelo


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 7/7] arm64: dts: mediatek: mt6359: add node for PMIC keys support
@ 2022-04-21 10:33     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-21 10:33 UTC (permalink / raw)
  To: Fabien Parent, Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: devicetree, linux-arm-kernel, linux-mediatek, linux-kernel

Il 15/04/22 17:36, Fabien Parent ha scritto:
> Add node for the MT6359 PMIC keyboard in mt6359.dtsi.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Hello Fabien,
I agree that all MT6359 PMICs do support pmic-keys, but not all devices using
this PMIC have physical keys connected to that.

Besides, even if all of them did, it wouldn't be guaranteed that key-0 would be
always KEY_POWER, as much as it wouldn't be guaranteed that key-1 would be always
KEY_HOME.

In my opinion, it *is* correct to add mediatek,mt6359-keys to the PMIC dtsi, but
you should do that without declaring any key, hence it's enough to do:

		mt6359_keys: mtk-pmic-keys {
			compatible = "mediatek,mt6359-keys";
		};

... then, any machine that *actually does* have these keys connected and manageable
in Linux should declare its own keys in its own dts/dtsi.

Of course, this means that you'll have to remove your input.h inclusion as well.

Regards,
Angelo


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

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 4/7] Input: mtk-pmic-keys: rename platform data struct
  2022-04-15 15:36   ` Fabien Parent
  (?)
@ 2022-04-21 15:56     ` Mattijs Korpershoek
  -1 siblings, 0 replies; 38+ messages in thread
From: Mattijs Korpershoek @ 2022-04-21 15:56 UTC (permalink / raw)
  To: Fabien Parent, Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

On ven., avril 15, 2022 at 17:36, Fabien Parent <fparent@baylibre.com> wrote:

> Rename the struct that is given to the .data field of the of_device_id
> entries to reflect that this structure will not only contain register
> definitions but also other platform data.
>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on mt8183-pumpkin 

> ---
>  drivers/input/keyboard/mtk-pmic-keys.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> index c31ab4368388..a0da644fe93d 100644
> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> @@ -50,12 +50,12 @@ struct mtk_pmic_keys_regs {
>  	.intsel_mask		= _intsel_mask,		\
>  }
>  
> -struct mtk_pmic_regs {
> +struct mtk_pmic_keys_pdata {
>  	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
>  	u32 pmic_rst_reg;
>  };
>  
> -static const struct mtk_pmic_regs mt6397_regs = {
> +static const struct mtk_pmic_keys_pdata mt6397_pdata = {
>  	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
>  		MTK_PMIC_KEYS_REGS(MT6397_CHRSTATUS,
>  		0x8, MT6397_INT_RSV, 0x10),
> @@ -65,7 +65,7 @@ static const struct mtk_pmic_regs mt6397_regs = {
>  	.pmic_rst_reg = MT6397_TOP_RST_MISC,
>  };
>  
> -static const struct mtk_pmic_regs mt6323_regs = {
> +static const struct mtk_pmic_keys_pdata mt6323_pdata = {
>  	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
>  		MTK_PMIC_KEYS_REGS(MT6323_CHRSTATUS,
>  		0x2, MT6323_INT_MISC_CON, 0x10),
> @@ -75,7 +75,7 @@ static const struct mtk_pmic_regs mt6323_regs = {
>  	.pmic_rst_reg = MT6323_TOP_RST_MISC,
>  };
>  
> -static const struct mtk_pmic_regs mt6358_regs = {
> +static const struct mtk_pmic_keys_pdata mt6358_pdata = {
>  	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
>  		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
>  				   0x2, MT6358_PSC_TOP_INT_CON0, 0x5),
> @@ -255,13 +255,13 @@ static SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend,
>  static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
>  	{
>  		.compatible = "mediatek,mt6397-keys",
> -		.data = &mt6397_regs,
> +		.data = &mt6397_pdata,
>  	}, {
>  		.compatible = "mediatek,mt6323-keys",
> -		.data = &mt6323_regs,
> +		.data = &mt6323_pdata,
>  	}, {
>  		.compatible = "mediatek,mt6358-keys",
> -		.data = &mt6358_regs,
> +		.data = &mt6358_pdata,
>  	}, {
>  		/* sentinel */
>  	}
> @@ -277,7 +277,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  	static const char *const irqnames[] = { "powerkey", "homekey" };
>  	static const char *const irqnames_r[] = { "powerkey_r", "homekey_r" };
>  	struct mtk_pmic_keys *keys;
> -	const struct mtk_pmic_regs *mtk_pmic_regs;
> +	const struct mtk_pmic_keys_pdata *mtk_pmic_keys_pdata;
>  	struct input_dev *input_dev;
>  	const struct of_device_id *of_id =
>  		of_match_device(of_mtk_pmic_keys_match_tbl, &pdev->dev);
> @@ -288,7 +288,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  
>  	keys->dev = &pdev->dev;
>  	keys->regmap = pmic_chip->regmap;
> -	mtk_pmic_regs = of_id->data;
> +	mtk_pmic_keys_pdata = of_id->data;
>  
>  	keys->input_dev = input_dev = devm_input_allocate_device(keys->dev);
>  	if (!input_dev) {
> @@ -310,7 +310,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  	}
>  
>  	for_each_child_of_node(node, child) {
> -		keys->keys[index].regs = &mtk_pmic_regs->keys_regs[index];
> +		keys->keys[index].regs = &mtk_pmic_keys_pdata->keys_regs[index];
>  
>  		keys->keys[index].irq =
>  			platform_get_irq_byname(pdev, irqnames[index]);
> @@ -358,7 +358,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  		return error;
>  	}
>  
> -	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_regs->pmic_rst_reg);
> +	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_keys_pdata->pmic_rst_reg);
>  
>  	platform_set_drvdata(pdev, keys);
>  
> -- 
> 2.35.2

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 4/7] Input: mtk-pmic-keys: rename platform data struct
@ 2022-04-21 15:56     ` Mattijs Korpershoek
  0 siblings, 0 replies; 38+ messages in thread
From: Mattijs Korpershoek @ 2022-04-21 15:56 UTC (permalink / raw)
  To: Fabien Parent, Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

On ven., avril 15, 2022 at 17:36, Fabien Parent <fparent@baylibre.com> wrote:

> Rename the struct that is given to the .data field of the of_device_id
> entries to reflect that this structure will not only contain register
> definitions but also other platform data.
>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on mt8183-pumpkin 

> ---
>  drivers/input/keyboard/mtk-pmic-keys.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> index c31ab4368388..a0da644fe93d 100644
> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> @@ -50,12 +50,12 @@ struct mtk_pmic_keys_regs {
>  	.intsel_mask		= _intsel_mask,		\
>  }
>  
> -struct mtk_pmic_regs {
> +struct mtk_pmic_keys_pdata {
>  	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
>  	u32 pmic_rst_reg;
>  };
>  
> -static const struct mtk_pmic_regs mt6397_regs = {
> +static const struct mtk_pmic_keys_pdata mt6397_pdata = {
>  	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
>  		MTK_PMIC_KEYS_REGS(MT6397_CHRSTATUS,
>  		0x8, MT6397_INT_RSV, 0x10),
> @@ -65,7 +65,7 @@ static const struct mtk_pmic_regs mt6397_regs = {
>  	.pmic_rst_reg = MT6397_TOP_RST_MISC,
>  };
>  
> -static const struct mtk_pmic_regs mt6323_regs = {
> +static const struct mtk_pmic_keys_pdata mt6323_pdata = {
>  	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
>  		MTK_PMIC_KEYS_REGS(MT6323_CHRSTATUS,
>  		0x2, MT6323_INT_MISC_CON, 0x10),
> @@ -75,7 +75,7 @@ static const struct mtk_pmic_regs mt6323_regs = {
>  	.pmic_rst_reg = MT6323_TOP_RST_MISC,
>  };
>  
> -static const struct mtk_pmic_regs mt6358_regs = {
> +static const struct mtk_pmic_keys_pdata mt6358_pdata = {
>  	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
>  		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
>  				   0x2, MT6358_PSC_TOP_INT_CON0, 0x5),
> @@ -255,13 +255,13 @@ static SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend,
>  static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
>  	{
>  		.compatible = "mediatek,mt6397-keys",
> -		.data = &mt6397_regs,
> +		.data = &mt6397_pdata,
>  	}, {
>  		.compatible = "mediatek,mt6323-keys",
> -		.data = &mt6323_regs,
> +		.data = &mt6323_pdata,
>  	}, {
>  		.compatible = "mediatek,mt6358-keys",
> -		.data = &mt6358_regs,
> +		.data = &mt6358_pdata,
>  	}, {
>  		/* sentinel */
>  	}
> @@ -277,7 +277,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  	static const char *const irqnames[] = { "powerkey", "homekey" };
>  	static const char *const irqnames_r[] = { "powerkey_r", "homekey_r" };
>  	struct mtk_pmic_keys *keys;
> -	const struct mtk_pmic_regs *mtk_pmic_regs;
> +	const struct mtk_pmic_keys_pdata *mtk_pmic_keys_pdata;
>  	struct input_dev *input_dev;
>  	const struct of_device_id *of_id =
>  		of_match_device(of_mtk_pmic_keys_match_tbl, &pdev->dev);
> @@ -288,7 +288,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  
>  	keys->dev = &pdev->dev;
>  	keys->regmap = pmic_chip->regmap;
> -	mtk_pmic_regs = of_id->data;
> +	mtk_pmic_keys_pdata = of_id->data;
>  
>  	keys->input_dev = input_dev = devm_input_allocate_device(keys->dev);
>  	if (!input_dev) {
> @@ -310,7 +310,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  	}
>  
>  	for_each_child_of_node(node, child) {
> -		keys->keys[index].regs = &mtk_pmic_regs->keys_regs[index];
> +		keys->keys[index].regs = &mtk_pmic_keys_pdata->keys_regs[index];
>  
>  		keys->keys[index].irq =
>  			platform_get_irq_byname(pdev, irqnames[index]);
> @@ -358,7 +358,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  		return error;
>  	}
>  
> -	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_regs->pmic_rst_reg);
> +	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_keys_pdata->pmic_rst_reg);
>  
>  	platform_set_drvdata(pdev, keys);
>  
> -- 
> 2.35.2

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 4/7] Input: mtk-pmic-keys: rename platform data struct
@ 2022-04-21 15:56     ` Mattijs Korpershoek
  0 siblings, 0 replies; 38+ messages in thread
From: Mattijs Korpershoek @ 2022-04-21 15:56 UTC (permalink / raw)
  To: Fabien Parent, Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

On ven., avril 15, 2022 at 17:36, Fabien Parent <fparent@baylibre.com> wrote:

> Rename the struct that is given to the .data field of the of_device_id
> entries to reflect that this structure will not only contain register
> definitions but also other platform data.
>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on mt8183-pumpkin 

> ---
>  drivers/input/keyboard/mtk-pmic-keys.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> index c31ab4368388..a0da644fe93d 100644
> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> @@ -50,12 +50,12 @@ struct mtk_pmic_keys_regs {
>  	.intsel_mask		= _intsel_mask,		\
>  }
>  
> -struct mtk_pmic_regs {
> +struct mtk_pmic_keys_pdata {
>  	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
>  	u32 pmic_rst_reg;
>  };
>  
> -static const struct mtk_pmic_regs mt6397_regs = {
> +static const struct mtk_pmic_keys_pdata mt6397_pdata = {
>  	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
>  		MTK_PMIC_KEYS_REGS(MT6397_CHRSTATUS,
>  		0x8, MT6397_INT_RSV, 0x10),
> @@ -65,7 +65,7 @@ static const struct mtk_pmic_regs mt6397_regs = {
>  	.pmic_rst_reg = MT6397_TOP_RST_MISC,
>  };
>  
> -static const struct mtk_pmic_regs mt6323_regs = {
> +static const struct mtk_pmic_keys_pdata mt6323_pdata = {
>  	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
>  		MTK_PMIC_KEYS_REGS(MT6323_CHRSTATUS,
>  		0x2, MT6323_INT_MISC_CON, 0x10),
> @@ -75,7 +75,7 @@ static const struct mtk_pmic_regs mt6323_regs = {
>  	.pmic_rst_reg = MT6323_TOP_RST_MISC,
>  };
>  
> -static const struct mtk_pmic_regs mt6358_regs = {
> +static const struct mtk_pmic_keys_pdata mt6358_pdata = {
>  	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
>  		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
>  				   0x2, MT6358_PSC_TOP_INT_CON0, 0x5),
> @@ -255,13 +255,13 @@ static SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend,
>  static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
>  	{
>  		.compatible = "mediatek,mt6397-keys",
> -		.data = &mt6397_regs,
> +		.data = &mt6397_pdata,
>  	}, {
>  		.compatible = "mediatek,mt6323-keys",
> -		.data = &mt6323_regs,
> +		.data = &mt6323_pdata,
>  	}, {
>  		.compatible = "mediatek,mt6358-keys",
> -		.data = &mt6358_regs,
> +		.data = &mt6358_pdata,
>  	}, {
>  		/* sentinel */
>  	}
> @@ -277,7 +277,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  	static const char *const irqnames[] = { "powerkey", "homekey" };
>  	static const char *const irqnames_r[] = { "powerkey_r", "homekey_r" };
>  	struct mtk_pmic_keys *keys;
> -	const struct mtk_pmic_regs *mtk_pmic_regs;
> +	const struct mtk_pmic_keys_pdata *mtk_pmic_keys_pdata;
>  	struct input_dev *input_dev;
>  	const struct of_device_id *of_id =
>  		of_match_device(of_mtk_pmic_keys_match_tbl, &pdev->dev);
> @@ -288,7 +288,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  
>  	keys->dev = &pdev->dev;
>  	keys->regmap = pmic_chip->regmap;
> -	mtk_pmic_regs = of_id->data;
> +	mtk_pmic_keys_pdata = of_id->data;
>  
>  	keys->input_dev = input_dev = devm_input_allocate_device(keys->dev);
>  	if (!input_dev) {
> @@ -310,7 +310,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  	}
>  
>  	for_each_child_of_node(node, child) {
> -		keys->keys[index].regs = &mtk_pmic_regs->keys_regs[index];
> +		keys->keys[index].regs = &mtk_pmic_keys_pdata->keys_regs[index];
>  
>  		keys->keys[index].irq =
>  			platform_get_irq_byname(pdev, irqnames[index]);
> @@ -358,7 +358,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  		return error;
>  	}
>  
> -	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_regs->pmic_rst_reg);
> +	mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_keys_pdata->pmic_rst_reg);
>  
>  	platform_set_drvdata(pdev, keys);
>  
> -- 
> 2.35.2

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

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 5/7] Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs
  2022-04-15 15:36   ` Fabien Parent
  (?)
@ 2022-04-21 15:57     ` Mattijs Korpershoek
  -1 siblings, 0 replies; 38+ messages in thread
From: Mattijs Korpershoek @ 2022-04-21 15:57 UTC (permalink / raw)
  To: Fabien Parent, Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

On ven., avril 15, 2022 at 17:36, Fabien Parent <fparent@baylibre.com> wrote:

> The MT6358 PMIC is not the only PMIC to have release IRQs. In order to
> support more PMIC that supports release IRQs, such as MT6357, MT6359,
> and possibly others, let's add some field in the platform data to
> indicate whether a PMIC support release keys.
>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on mt8183-pumpkin 

> ---
>  drivers/input/keyboard/mtk-pmic-keys.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> index a0da644fe93d..609b87afd020 100644
> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> @@ -53,6 +53,7 @@ struct mtk_pmic_keys_regs {
>  struct mtk_pmic_keys_pdata {
>  	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
>  	u32 pmic_rst_reg;
> +	bool has_key_release_irqs;
>  };
>  
>  static const struct mtk_pmic_keys_pdata mt6397_pdata = {
> @@ -83,6 +84,7 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = {
>  		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
>  				   0x8, MT6358_PSC_TOP_INT_CON0, 0xa),
>  	.pmic_rst_reg = MT6358_TOP_RST_MISC,
> +	.has_key_release_irqs = true,
>  };
>  
>  struct mtk_pmic_keys_info {
> @@ -319,7 +321,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  			return keys->keys[index].irq;
>  		}
>  
> -		if (of_device_is_compatible(node, "mediatek,mt6358-keys")) {
> +		if (mtk_pmic_keys_pdata->has_key_release_irqs) {
>  			keys->keys[index].irq_r = platform_get_irq_byname(pdev,
>  									  irqnames_r[index]);
>  
> -- 
> 2.35.2

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 5/7] Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs
@ 2022-04-21 15:57     ` Mattijs Korpershoek
  0 siblings, 0 replies; 38+ messages in thread
From: Mattijs Korpershoek @ 2022-04-21 15:57 UTC (permalink / raw)
  To: Fabien Parent, Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

On ven., avril 15, 2022 at 17:36, Fabien Parent <fparent@baylibre.com> wrote:

> The MT6358 PMIC is not the only PMIC to have release IRQs. In order to
> support more PMIC that supports release IRQs, such as MT6357, MT6359,
> and possibly others, let's add some field in the platform data to
> indicate whether a PMIC support release keys.
>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on mt8183-pumpkin 

> ---
>  drivers/input/keyboard/mtk-pmic-keys.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> index a0da644fe93d..609b87afd020 100644
> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> @@ -53,6 +53,7 @@ struct mtk_pmic_keys_regs {
>  struct mtk_pmic_keys_pdata {
>  	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
>  	u32 pmic_rst_reg;
> +	bool has_key_release_irqs;
>  };
>  
>  static const struct mtk_pmic_keys_pdata mt6397_pdata = {
> @@ -83,6 +84,7 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = {
>  		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
>  				   0x8, MT6358_PSC_TOP_INT_CON0, 0xa),
>  	.pmic_rst_reg = MT6358_TOP_RST_MISC,
> +	.has_key_release_irqs = true,
>  };
>  
>  struct mtk_pmic_keys_info {
> @@ -319,7 +321,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  			return keys->keys[index].irq;
>  		}
>  
> -		if (of_device_is_compatible(node, "mediatek,mt6358-keys")) {
> +		if (mtk_pmic_keys_pdata->has_key_release_irqs) {
>  			keys->keys[index].irq_r = platform_get_irq_byname(pdev,
>  									  irqnames_r[index]);
>  
> -- 
> 2.35.2

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 5/7] Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs
@ 2022-04-21 15:57     ` Mattijs Korpershoek
  0 siblings, 0 replies; 38+ messages in thread
From: Mattijs Korpershoek @ 2022-04-21 15:57 UTC (permalink / raw)
  To: Fabien Parent, Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

On ven., avril 15, 2022 at 17:36, Fabien Parent <fparent@baylibre.com> wrote:

> The MT6358 PMIC is not the only PMIC to have release IRQs. In order to
> support more PMIC that supports release IRQs, such as MT6357, MT6359,
> and possibly others, let's add some field in the platform data to
> indicate whether a PMIC support release keys.
>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on mt8183-pumpkin 

> ---
>  drivers/input/keyboard/mtk-pmic-keys.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> index a0da644fe93d..609b87afd020 100644
> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> @@ -53,6 +53,7 @@ struct mtk_pmic_keys_regs {
>  struct mtk_pmic_keys_pdata {
>  	const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
>  	u32 pmic_rst_reg;
> +	bool has_key_release_irqs;
>  };
>  
>  static const struct mtk_pmic_keys_pdata mt6397_pdata = {
> @@ -83,6 +84,7 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = {
>  		MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
>  				   0x8, MT6358_PSC_TOP_INT_CON0, 0xa),
>  	.pmic_rst_reg = MT6358_TOP_RST_MISC,
> +	.has_key_release_irqs = true,
>  };
>  
>  struct mtk_pmic_keys_info {
> @@ -319,7 +321,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
>  			return keys->keys[index].irq;
>  		}
>  
> -		if (of_device_is_compatible(node, "mediatek,mt6358-keys")) {
> +		if (mtk_pmic_keys_pdata->has_key_release_irqs) {
>  			keys->keys[index].irq_r = platform_get_irq_byname(pdev,
>  									  irqnames_r[index]);
>  
> -- 
> 2.35.2

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

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 2/7] mfd: add missing defines necessary for mtk-pmic-keys support
  2022-04-15 15:36   ` Fabien Parent
  (?)
@ 2022-04-26 14:14     ` Lee Jones
  -1 siblings, 0 replies; 38+ messages in thread
From: Lee Jones @ 2022-04-26 14:14 UTC (permalink / raw)
  To: Fabien Parent
  Cc: Matthias Brugger, linux-arm-kernel, linux-mediatek, linux-kernel

On Fri, 15 Apr 2022, Fabien Parent wrote:

> Add 2 missing MT6359 registers that are needed to implement
> the keyboard driver.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> ---
>  include/linux/mfd/mt6359/registers.h | 2 ++
>  1 file changed, 2 insertions(+)

I fixed the subject line for you and applied, thanks.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 2/7] mfd: add missing defines necessary for mtk-pmic-keys support
@ 2022-04-26 14:14     ` Lee Jones
  0 siblings, 0 replies; 38+ messages in thread
From: Lee Jones @ 2022-04-26 14:14 UTC (permalink / raw)
  To: Fabien Parent
  Cc: Matthias Brugger, linux-arm-kernel, linux-mediatek, linux-kernel

On Fri, 15 Apr 2022, Fabien Parent wrote:

> Add 2 missing MT6359 registers that are needed to implement
> the keyboard driver.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> ---
>  include/linux/mfd/mt6359/registers.h | 2 ++
>  1 file changed, 2 insertions(+)

I fixed the subject line for you and applied, thanks.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 2/7] mfd: add missing defines necessary for mtk-pmic-keys support
@ 2022-04-26 14:14     ` Lee Jones
  0 siblings, 0 replies; 38+ messages in thread
From: Lee Jones @ 2022-04-26 14:14 UTC (permalink / raw)
  To: Fabien Parent
  Cc: Matthias Brugger, linux-arm-kernel, linux-mediatek, linux-kernel

On Fri, 15 Apr 2022, Fabien Parent wrote:

> Add 2 missing MT6359 registers that are needed to implement
> the keyboard driver.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> ---
>  include/linux/mfd/mt6359/registers.h | 2 ++
>  1 file changed, 2 insertions(+)

I fixed the subject line for you and applied, thanks.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 3/7] mfd: mt6397-core: add resources for PMIC keys for MT6359
  2022-04-15 15:36   ` Fabien Parent
  (?)
@ 2022-04-26 14:14     ` Lee Jones
  -1 siblings, 0 replies; 38+ messages in thread
From: Lee Jones @ 2022-04-26 14:14 UTC (permalink / raw)
  To: Fabien Parent
  Cc: Matthias Brugger, linux-arm-kernel, linux-mediatek, linux-kernel

On Fri, 15 Apr 2022, Fabien Parent wrote:

> Add the MFD resources in order to be able to probe and use the keyboard
> driver for the MT6359 PMIC.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> ---
>  drivers/mfd/mt6397-core.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 3/7] mfd: mt6397-core: add resources for PMIC keys for MT6359
@ 2022-04-26 14:14     ` Lee Jones
  0 siblings, 0 replies; 38+ messages in thread
From: Lee Jones @ 2022-04-26 14:14 UTC (permalink / raw)
  To: Fabien Parent
  Cc: Matthias Brugger, linux-arm-kernel, linux-mediatek, linux-kernel

On Fri, 15 Apr 2022, Fabien Parent wrote:

> Add the MFD resources in order to be able to probe and use the keyboard
> driver for the MT6359 PMIC.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> ---
>  drivers/mfd/mt6397-core.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 3/7] mfd: mt6397-core: add resources for PMIC keys for MT6359
@ 2022-04-26 14:14     ` Lee Jones
  0 siblings, 0 replies; 38+ messages in thread
From: Lee Jones @ 2022-04-26 14:14 UTC (permalink / raw)
  To: Fabien Parent
  Cc: Matthias Brugger, linux-arm-kernel, linux-mediatek, linux-kernel

On Fri, 15 Apr 2022, Fabien Parent wrote:

> Add the MFD resources in order to be able to probe and use the keyboard
> driver for the MT6359 PMIC.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> ---
>  drivers/mfd/mt6397-core.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2022-04-26 14:17 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 15:36 [PATCH 0/7] Input: mtk-pmic-keys: Add support for MT6359 PMIC Fabien Parent
2022-04-15 15:36 ` Fabien Parent
2022-04-15 15:36 ` [PATCH 1/7] dt-bindings: input: mtk-pmic-keys: add MT6359 binding definition Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-15 15:36 ` [PATCH 2/7] mfd: add missing defines necessary for mtk-pmic-keys support Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-26 14:14   ` Lee Jones
2022-04-26 14:14     ` Lee Jones
2022-04-26 14:14     ` Lee Jones
2022-04-15 15:36 ` [PATCH 3/7] mfd: mt6397-core: add resources for PMIC keys for MT6359 Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-26 14:14   ` Lee Jones
2022-04-26 14:14     ` Lee Jones
2022-04-26 14:14     ` Lee Jones
2022-04-15 15:36 ` [PATCH 4/7] Input: mtk-pmic-keys: rename platform data struct Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-21 15:56   ` Mattijs Korpershoek
2022-04-21 15:56     ` Mattijs Korpershoek
2022-04-21 15:56     ` Mattijs Korpershoek
2022-04-15 15:36 ` [PATCH 5/7] Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-21 15:57   ` Mattijs Korpershoek
2022-04-21 15:57     ` Mattijs Korpershoek
2022-04-21 15:57     ` Mattijs Korpershoek
2022-04-15 15:36 ` [PATCH 6/7] Input: keyboard: mtk-pmic-keys: add support for MT6359 Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-15 15:36 ` [PATCH 7/7] arm64: dts: mediatek: mt6359: add node for PMIC keys support Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-15 15:36   ` Fabien Parent
2022-04-21 10:33   ` AngeloGioacchino Del Regno
2022-04-21 10:33     ` AngeloGioacchino Del Regno
2022-04-21 10:33     ` AngeloGioacchino Del Regno

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.