[PATCH v3 1/2] HID: spi-hid: propagate reset assertion errors during initialization

From
Jizhou Tong <hidden>
Date
2026-11-05 19:15:57
Also in
lkml
Reply to
Jizhou Tong, 2026-11-05
Stop initialization before power-up or IRQ enablement if asserting reset
fails. Return the platform error through the core probe and frontend.
This initialization path still ignores the assertion error in v7.

Signed-off-by: Jizhou Tong <redacted>
---
 drivers/hid/spi-hid/spi-hid-core.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/spi-hid/spi-hid-core.c b/drivers/hid/spi-hid/spi-hid-core.c
index 496b33cdf3..fd64d2d2cb 100644
--- a/drivers/hid/spi-hid/spi-hid-core.c
+++ b/drivers/hid/spi-hid/spi-hid-core.c
@@ -1468,7 +1468,11 @@ static int spi_hid_dev_init(struct spi_hid *shid)
 
 	guard(mutex)(&shid->power_lock);
 
-	shid->ops->assert_reset(shid->ops);
+	error = shid->ops->assert_reset(shid->ops);
+	if (error) {
+		dev_err(dev, "failed to assert reset: %d\n", error);
+		return error;
+	}
 
 	shid->ops->sleep_minimal_reset_delay(shid->ops);
 
Thread (56 messages) 56 messages, 6 authors, last reply 18h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help