Skip to contentSkip to conversation

dt-bindings: mfd: hisilicon: Fix Hi6421 SPMI compatible

PATCH Superseded Rob Herring (Arm) 2 participants 3 messages Sep 21 – Sep 23

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: mfd: hisilicon: Fix Hi6421 SPMI compatible

Use the hisilicon,hi6421-spmi compatible documented by the in-tree DTS and matched by the Hi6421 SPMI PMIC driver. Also allow the GPIO interrupt line property used by the HiKey970 PMIC node.

Assisted-by LLM
Fixes dee8a4e807dc ("dt-bindings: mfd: Convert hisilicon,hi6421-pmic to DT schema")
---
 .../bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml           | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml +5 -2
index 6a824351834e..9275c561e9d4 100644
@@ -24,7 +24,7 @@ properties:
     pattern: "pmic@[0-9a-f]"
 
   compatible:
-    const: hisilicon,hi6421v600-spmi
+    const: hisilicon,hi6421-spmi
 
   reg:
     maxItems: 1
@@ -32,6 +32,9 @@ properties:
   '#interrupt-cells':
     const: 2
 
+  gpios:
+    maxItems: 1
+
   interrupt-controller: true
 
   interrupts:
@@ -66,7 +69,7 @@ examples:
         #size-cells = <0>;
 
         pmic@0 {
-            compatible = "hisilicon,hi6421v600-spmi";
+            compatible = "hisilicon,hi6421-spmi";
             reg = <0 SPMI_USID>;
 
             #interrupt-cells = <2>;
Signature · 1 line
2.53.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] dt-bindings: mfd: hi6421: invalid gpios property for interrupt line --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: mfd: hi6421: invalid gpios property for interrupt line --

commit 4ce4ba18007f2f81249a1f2307d744174beb3e75
Author: Rob Herring (Arm) <[email protected]>

dt-bindings: mfd: hisilicon: Fix Hi6421 SPMI compatible

This commit updates the device tree binding for the Hi6421 SPMI PMIC to use the hisilicon,hi6421-spmi compatible string. It also allows the gpios property for the GPIO interrupt line used by the HiKey970 PMIC node.

Quoted 4 lines
Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml +0 -0
index 6a824351834ee..9275c561e9d49 100644

[ ... ]

Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml properties: · line 37

Quoted 7 lines
Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml +3 -0
@@ -32,6 +32,9 @@ properties:
   '#interrupt-cells':
     const: 2
 
+  gpios:
+    maxItems: 1
+

[Severity: Medium]
Does this property legitimize a broken device tree description by using gpios for an interrupt line?

Looking at the driver in hi6421v600_irq_probe(), it unconditionally relies on platform_get_irq() to fetch its interrupt:

drivers/misc/hi6421v600-irq.c:hi6421v600_irq_probe() {
	...
	priv->irq = platform_get_irq(pmic_pdev, 0);
	if (priv->irq < 0)
		return priv->irq;
	...
}

Because platform_get_irq() only parses the "interrupts" property, it lacks a fallback to parse "gpios". Will this cause the driver to fail to probe when using the HiKey970 PMIC node configuration since it cannot find the interrupt?

Quoted 3 lines
Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml +0 -0
   interrupt-controller: true
 
   interrupts:
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
author maintainer
#2 lore raw
Quoted 41 lines · On Mon, Sep 21, 2026 at 11:36:50PM +0000, [email protected] wrote:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: mfd: hi6421: invalid gpios property for interrupt line --

commit 4ce4ba18007f2f81249a1f2307d744174beb3e75
Author: Rob Herring (Arm) <[email protected]>

dt-bindings: mfd: hisilicon: Fix Hi6421 SPMI compatible

This commit updates the device tree binding for the Hi6421 SPMI PMIC to use the hisilicon,hi6421-spmi compatible string. It also allows the gpios property for the GPIO interrupt line used by the HiKey970 PMIC node.

Quoted 4 lines
Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml +0 -0
index 6a824351834ee..9275c561e9d49 100644

[ ... ]

Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml properties: · line 37

Quoted 7 lines
Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml +3 -0
@@ -32,6 +32,9 @@ properties:
   '#interrupt-cells':
     const: 2
 
+  gpios:
+    maxItems: 1
+

[Severity: Medium]
Does this property legitimize a broken device tree description by using gpios for an interrupt line?

Looking at the driver in hi6421v600_irq_probe(), it unconditionally relies on platform_get_irq() to fetch its interrupt:

drivers/misc/hi6421v600-irq.c:hi6421v600_irq_probe() {
	...
	priv->irq = platform_get_irq(pmic_pdev, 0);
	if (priv->irq < 0)
		return priv->irq;
	...
}
Quoted 3 lines

Because platform_get_irq() only parses the "interrupts" property, it lacks a fallback to parse "gpios". Will this cause the driver to fail to probe when using the HiKey970 PMIC node configuration since it cannot find the interrupt?

The staging driver used 'gpios'. That was moved to interrupts, so the gpios hunk can be dropped. And then the .dts needs to be updated.

Rob