[PATCH v2 1/2] HID: spi-hid: propagate reset assertion errors during initialization
From: Jizhou Tong
Date: Mon Oct 12 2026 - 23:11:46 EST
Stop initialization if the platform cannot assert reset. Powering up and
enabling the IRQ after a failed reset assertion can leave the device in
an unknown state while probe reports success.
Return the platform error unchanged from spi_hid_dev_init(). The
non-panel-follower probe path propagates it through spi_hid_core_probe()
to the OF or ACPI frontend, failing probe before power-up or IRQ
enablement.
Signed-off-by: Jizhou Tong <fqwqf@xxxxxxxxx>
---
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 106e92b71ffb62c05a1c10b975759d71440b47b0..1aae7863e87de766444e7eae392335e4b1daa85e 100644
--- a/drivers/hid/spi-hid/spi-hid-core.c
+++ b/drivers/hid/spi-hid/spi-hid-core.c
@@ -1524,7 +1524,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);
--
2.53.0