Thread (3 messages) 3 messages, 2 authors, 15d ago

Re: [PATCH] dt-bindings: mfd: hisilicon: Fix Hi6421 SPMI compatible

flat view

From: sashiko-bot@kernel.org
Date: 2026-09-21 23:36:51

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) [off-list ref]

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 hunk ↗ jump to hunk
diff --git a/Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
index 6a824351834ee..9275c561e9d49 100644
--- a/Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
+++ b/Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
[ ... ]
quoted hunk ↗ jump to hunk
@@ -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?
   interrupt-controller: true
 
   interrupts:
-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260921232625.3131242-1-robh@kernel.org?part=1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help