From nobody Tue Oct 29 23:13:08 2024 X-Original-To: dev-commits-src-all@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 4XdQz82d0rz5b6Sw; Tue, 29 Oct 2024 23:13:08 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XdQz81v5Qz43Jq; Tue, 29 Oct 2024 23:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730243588; 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=Jj2CoKv1jp6ttbqyKvV2tygoLDgcI8PARWEURFX6KV8=; b=qSBeJ0aN0nxlK4BaRvOhp7dp8pW1kDmH/V6qe780VigddHz6g7l0tQhWHsH3ZgcziHPny6 ZLwr8BUmx6vo2gxdcVYpxCbEcdzNCNR/ShtNIy0J11rb9dNEPpXSwf9fV6/xRIni36J7Gk Rv/1Ic9+6C3W2U/ktApYlJuZBl5NPxUmeBBYPXxuo79mE51Tm2NFfIiss7cfuYS19TSQEx 7K8g9YLeK+9EsJ79TusPyRqm7ETEA60OwodYCGH5WKZ4sGIcmlbBlcBlelRoFitCLE8vW8 uCe2GjM702KZiKo2+d0QxogFNpvgfpaAII4smfoOU3LYc2ijawhBrNmZfL63Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730243588; 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=Jj2CoKv1jp6ttbqyKvV2tygoLDgcI8PARWEURFX6KV8=; b=asby2LQ8LOJJ8QyT/81c3sSdmTFQyrGf7DWkqATbmAH+qhNDhRwDHuWw530bm0d+s7Ytpw MiFw99oDr4T/lMQi4e8zfHOjEPCmRwsOUleQmZpN8v9EG+uYtcH7dM6260+imk62sVYGkP woDyR7Odvhq/9xNsFeQY1osFy2sg2F3C0vv33P11lxIldvQaonrijS8nexOP+jn7U0OaVw oqZaMdJDtoHcF7MYaZh7+t7CXHjuR8QDVd7gVRjtN+Vob+eSjxQhtNoSSC5yJePFIGO16j aPj8ngoXK11p/QBytP75y91BO4/9sQ4WphKvcWmU4JiJGAJCp/2wLlaqsIDc9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730243588; a=rsa-sha256; cv=none; b=DcvL++EMp4GmNNrD8a4pttu8PvaGkWcxTrGseHoDW/jhlAcZfX7VjyAH6UoRAn00nuCD6E 25PFhCc1S/gRSVPy4KonsmTE3SwraLjav0ESKC9CP9ldRXGYqoBOacgUIhEskH1+Y8GmI+ qifR4lOy8akR3DF/dd/iwEF7GqHUa3ymfilF5iami3zMNOVxBKZB3SxIo9mNkf6qtEN2iZ siX4DdierdKG5tLXNvO+EIDIEHQxbPdWOWiRYc76B4M9PHLDi43lLUKNDM3DCqWgdxUmr0 +IScVAllsRpgFFuhzpQsP1mZWkp9UJLEjL8xeowGsPdcMfwpbO0XWqe3MyPTGA== 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 4XdQz81T52zk9l; Tue, 29 Oct 2024 23:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49TND8UX019491; Tue, 29 Oct 2024 23:13:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49TND8V7019488; Tue, 29 Oct 2024 23:13:08 GMT (envelope-from git) Date: Tue, 29 Oct 2024 23:13:08 GMT Message-Id: <202410292313.49TND8V7019488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 0ffd7d4d15d4 - main - acpi_gpiobus: IoRestriction is only for type IO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ffd7d4d15d468c60ef274f8368a5722e3f7f6a1 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0ffd7d4d15d468c60ef274f8368a5722e3f7f6a1 commit 0ffd7d4d15d468c60ef274f8368a5722e3f7f6a1 Author: Colin Percival AuthorDate: 2024-10-29 16:32:38 +0000 Commit: Colin Percival CommitDate: 2024-10-29 23:12:23 +0000 acpi_gpiobus: IoRestriction is only for type IO The IoRestriction field of ACPI_RESOURCE_GPIO is only meaningful for resources of type ACPI_RESOURCE_GPIO_TYPE_IO. Reported by: jrtc27 Reviewed by: jrtc27 Differential Revision: --- sys/dev/gpio/acpi_gpiobus.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/dev/gpio/acpi_gpiobus.c b/sys/dev/gpio/acpi_gpiobus.c index 9828170daeca..c01d825fabf5 100644 --- a/sys/dev/gpio/acpi_gpiobus.c +++ b/sys/dev/gpio/acpi_gpiobus.c @@ -73,13 +73,15 @@ acpi_gpiobus_convflags(ACPI_RESOURCE_GPIO *gpio_res) flags |= GPIO_INTR_SHAREABLE; #endif } - switch (gpio_res->IoRestriction) { - case ACPI_IO_RESTRICT_INPUT: - flags |= GPIO_PIN_INPUT; - break; - case ACPI_IO_RESTRICT_OUTPUT: - flags |= GPIO_PIN_OUTPUT; - break; + if (gpio_res->ConnectionType == ACPI_RESOURCE_GPIO_TYPE_IO) { + switch (gpio_res->IoRestriction) { + case ACPI_IO_RESTRICT_INPUT: + flags |= GPIO_PIN_INPUT; + break; + case ACPI_IO_RESTRICT_OUTPUT: + flags |= GPIO_PIN_OUTPUT; + break; + } } switch (gpio_res->PinConfig) {