[Bug 280290] hms(4): Broken fresh after boot, fixed by resume

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 27 Oct 2024 13:38:09 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280290

--- Comment #24 from Edward Tomasz Napierala <trasz@FreeBSD.org> ---
Hah, good call with that ACPI thing.  This patch fixes it for me:

diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c
index fc9f5c2a68b3..03b951b22878 100644
--- a/sys/dev/iicbus/iichid.c
+++ b/sys/dev/iicbus/iichid.c
@@ -1207,6 +1207,13 @@ iichid_attach(device_t dev)
 done:
        (void)iichid_set_power(sc, I2C_HID_POWER_OFF);
        sc->power_on = false;
+
+       error = iichid_set_power_state(sc, IICHID_PS_NULL, IICHID_PS_ON);
+       if (error != 0)
+               DPRINTF(sc, "Could not set power_state, error: %d\n", error);
+       else
+               DPRINTF(sc, "Successfully set power_state\n");
+
        return (error);
 }

-- 
You are receiving this mail because:
You are the assignee for the bug.