Skip to contentSkip to conversation

SPMI fixlets

PATCH New Stephen Boyd 1 participant 4 messages Jul 25, 2024

Subsystems (3)
lore
Share & tools
lore

Stephen Boyd

author maintainer
#0 lore raw

cover SPMI fixlets

Hi Greg,

Here's some small SPMI fixes that I found while searching through my inbox. I see you've already picked up the module description one but I've included it here anyway for completeness. The pmic-arb irq domain fix is the most important one here. Unfortunately I missed it and so SPMI interrupts for newer platforms are busted in v6.10. Luckily there aren't that many of those devices in use so the damage was minimal.

David Collins (1):
spmi: pmic-arb: add missing newline in dev_err format strings

Jeff Johnson (1):
spmi: add missing MODULE_DESCRIPTION() macros

Konrad Dybcio (1):
spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree

 drivers/spmi/hisi-spmi-controller.c |  1 +
 drivers/spmi/spmi-pmic-arb.c        | 12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0

Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
author maintainer
#1 lore raw

PATCH 1/3 spmi: add missing MODULE_DESCRIPTION() macros

From: Jeff Johnson <[email protected]>

make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spmi/hisi-spmi-controller.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spmi/spmi-pmic-arb.o

Add the missing invocations of the MODULE_DESCRIPTION() macro.

---
 drivers/spmi/hisi-spmi-controller.c | 1 +
 drivers/spmi/spmi-pmic-arb.c        | 1 +
 2 files changed, 2 insertions(+)
drivers/spmi/hisi-spmi-controller.c +1 -0
index fa068b34b040..3cafdf22c909 100644
@@ -344,6 +344,7 @@ static void __exit spmi_controller_exit(void)
 }
 module_exit(spmi_controller_exit);
 
+MODULE_DESCRIPTION("Hisilicon 3670 SPMI Controller driver");
 MODULE_LICENSE("GPL v2");
 MODULE_VERSION("1.0");
 MODULE_ALIAS("platform:spmi_controller");
drivers/spmi/spmi-pmic-arb.c +1 -0
index 791cdc160c51..f240fcc5a4e1 100644
@@ -1891,5 +1891,6 @@ static struct platform_driver spmi_pmic_arb_driver = {
 };
 module_platform_driver(spmi_pmic_arb_driver);
 
+MODULE_DESCRIPTION("Qualcomm MSM SPMI Controller (PMIC Arbiter) driver");
 MODULE_LICENSE("GPL v2");
 MODULE_ALIAS("platform:spmi_pmic_arb");
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
author maintainer
#2 lore raw

PATCH 2/3 spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree

In reply to Stephen Boyd

From: Konrad Dybcio <[email protected]>

Currently, irqchips for all of the subnodes (which represent a given bus master) point to the parent wrapper node. This is no bueno, as no interrupts arrive, ever (because nothing references that node).

Fix that by passing a reference to the respective master's of_node.

Worth noting, this is a NOP for devices with only a single master described.

---
 drivers/spmi/spmi-pmic-arb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/spmi/spmi-pmic-arb.c +1 -2
index f240fcc5a4e1..b6880c13163c 100644
@@ -1737,8 +1737,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,
 
 	dev_dbg(&pdev->dev, "adding irq domain for bus %d\n", bus_index);
 
-	bus->domain = irq_domain_add_tree(dev->of_node,
-					  &pmic_arb_irq_domain_ops, bus);
+	bus->domain = irq_domain_add_tree(node, &pmic_arb_irq_domain_ops, bus);
 	if (!bus->domain) {
 		dev_err(&pdev->dev, "unable to create irq_domain\n");
 		return -ENOMEM;
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
author maintainer
#3 lore raw

PATCH 3/3 spmi: pmic-arb: add missing newline in dev_err format strings

In reply to Stephen Boyd

From: David Collins <[email protected]>

dev_err() format strings should end with '\n'. Several such format strings in the spmi-pmic-arb driver are missing it. Add newlines where needed.

Fixes 02922ccbb330 ("spmi: pmic-arb: Register controller for bus instead of arbiter")
---
 drivers/spmi/spmi-pmic-arb.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/spmi/spmi-pmic-arb.c +4 -4
index b6880c13163c..9ba9495fcc4b 100644
@@ -398,7 +398,7 @@ static int pmic_arb_fmt_read_cmd(struct spmi_pmic_arb_bus *bus, u8 opc, u8 sid,
 
 	*offset = rc;
 	if (bc >= PMIC_ARB_MAX_TRANS_BYTES) {
-		dev_err(&bus->spmic->dev, "pmic-arb supports 1..%d bytes per trans, but:%zu requested",
+		dev_err(&bus->spmic->dev, "pmic-arb supports 1..%d bytes per trans, but:%zu requested\n",
 			PMIC_ARB_MAX_TRANS_BYTES, len);
 		return  -EINVAL;
 	}
@@ -477,7 +477,7 @@ static int pmic_arb_fmt_write_cmd(struct spmi_pmic_arb_bus *bus, u8 opc,
 
 	*offset = rc;
 	if (bc >= PMIC_ARB_MAX_TRANS_BYTES) {
-		dev_err(&bus->spmic->dev, "pmic-arb supports 1..%d bytes per trans, but:%zu requested",
+		dev_err(&bus->spmic->dev, "pmic-arb supports 1..%d bytes per trans, but:%zu requested\n",
 			PMIC_ARB_MAX_TRANS_BYTES, len);
 		return  -EINVAL;
 	}
@@ -1702,7 +1702,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,
 
 	index = of_property_match_string(node, "reg-names", "cnfg");
 	if (index < 0) {
-		dev_err(dev, "cnfg reg region missing");
+		dev_err(dev, "cnfg reg region missing\n");
 		return -EINVAL;
 	}
 
@@ -1712,7 +1712,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,
 
 	index = of_property_match_string(node, "reg-names", "intr");
 	if (index < 0) {
-		dev_err(dev, "intr reg region missing");
+		dev_err(dev, "intr reg region missing\n");
 		return -EINVAL;
 	}
 
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git