From nobody Tue Nov 30 21:31:14 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BEE0C18B058A; Tue, 30 Nov 2021 21:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3b4f6zQSz3PrL; Tue, 30 Nov 2021 21:31:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CACC51DB82; Tue, 30 Nov 2021 21:31:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AULVEVg051083; Tue, 30 Nov 2021 21:31:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AULVEwM051082; Tue, 30 Nov 2021 21:31:14 GMT (envelope-from git) Date: Tue, 30 Nov 2021 21:31:14 GMT Message-Id: <202111302131.1AULVEwM051082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: c508b0818b24 - main - iichid(4): Perform acknowledgement of I2C device interrupt after RESET command List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c508b0818b245ea136d6538d68868cb3541f8f8f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638307875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MyVLcAq30eLPTqHgEwE1gdd0XCL/tWgaBMs2SI3RNX0=; b=rxNbiU8fIGmljcMsgIPurDPwlYYAWmgdotWlWx+KyjmN0nNswOgEvvOcGZ0sqbJggbj/Oi cNhxvB4HWH+AW7hJxfKMBvnbpQ8oWPuTCZ7dLClqoD7F2l50Qw7XFSn4EeJX8YXg5hqhZP BVk6y+4KMF6hbuslgEblSn0z3XqwN4SSAMhyaMitydXJoCKLx2cqELhmHFNuN/GlJmceHa L+poKs51NErK6xHlYtyHkJPDCm+ZWNkWKlgilh8wLswyp0+W/Qd1oh9zCEvfc9MYrNIX9x OoCEkEj9hWfXPkCcQr1NIKBoNB1nQ0/+9aNSmsc3cVyEVJ0yeBzoNHI0b6E+ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638307875; a=rsa-sha256; cv=none; b=Usu9RTpxdozzUORoSzERKRfl7v+6GhIjMSFkNzBY4cu5he6I4hop1juaweJ9tN/wXbMsmA evKolBaXjDMIQY1nVWB+KvY4I/PZyy/Kgqcrm4zH34l9YK0akK6jwfboQehIuJ86fncM8s IS7y3Rj5mXr1gk25IDdfxgS+CDeSrEw8PWD3QwPqzO7BONxPEMcUjEqudzU+DK3gcUT6Ec jyOUUJLSIgVgWjrr+HsUxaXacLkwySkqkEoBFGk1QX3tOj9J9jgfeQPMb4DV+VVmpZu6PA fKaEnPXpieR/gqVoAuZkeRbUkibH4c3DszaukaSiBnd5g2AopRF5d9FTKqEWPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=c508b0818b245ea136d6538d68868cb3541f8f8f commit c508b0818b245ea136d6538d68868cb3541f8f8f Author: Vladimir Kondratyev AuthorDate: 2021-11-30 21:29:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-11-30 21:29:50 +0000 iichid(4): Perform acknowledgement of I2C device interrupt after RESET command in sampling mode to workaround firmware bug. This fixes reboot or poweroff on frame.work laptops after first touch. Reported by: many PR: 259230 MFC after: 1 week Tested by: kevans, markj --- sys/dev/iicbus/iichid.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index d95ffb8add88..a36ed9bb8538 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -1134,6 +1134,11 @@ iichid_attach(device_t dev) &sc->sampling_hysteresis, 0, "number of missing samples before enabling of slow mode"); hid_add_dynamic_quirk(&sc->hw, HQ_IICHID_SAMPLING); + + if (sc->sampling_rate_slow >= 0) { + pause("iichid", (hz + 999) / 1000); + (void)iichid_cmd_read(sc, NULL, 0, NULL); + } #endif /* IICHID_SAMPLING */ child = device_add_child(dev, "hidbus", -1);