From nobody Wed Aug 20 06:59:50 2025 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 4c6HPy45nhz64VJ4; Wed, 20 Aug 2025 06:59:50 +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 4c6HPy26vQz3VJK; Wed, 20 Aug 2025 06:59:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755673190; 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=2fp0zgJOsk8Zc2eTCyga24DvufUZ9+93FUv1ThQVmO8=; b=B82dY2T51dW3aDzRkgteISahXAdHcTJkhD0tRGgEUBXbvQ6llM9UH8q6kCLEg4kPFbZcwE Xtrsy0BI6gC5dcleQT6VlJcN6mBG3m80NvBfPkSr48AThQX+4G+EntX9FnjklnBhPY4f3O zAIy9uC3oq8QWlS07vXBSEERRMFmhxQ7mAuVjqVZtYmHTuZAxiwR/tOUqwv0wGHohk8xdV Rh6ncLujyRddYNW74orytGIWuCFGMN94P+LZaV/o28V6LwJh69xTAwrMVqzWxdqqWbirnn Z/j5DpDxTM94IM8GfCTt1W8kDnovvoluZm/sco8c1UKeIgI/zQMzPS33gL4D8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755673190; 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=2fp0zgJOsk8Zc2eTCyga24DvufUZ9+93FUv1ThQVmO8=; b=UT7T2Sn2YwGHM1/myUM4OSxHFocdyHN4Job7O9EOGOlUfgo0u2+qp31l7djNy/BcrM+kzt j6MUtNZgkRTkW/wML9F2GosZu21wH/kw3/RRNtsPxbtxDBQ4sG16iJdeeslyCtk1n6fEyJ We51TiNn5BDtoyFC2pTVt8Uc2gl52lZ6e7kDGifM8fF0NHZeMej4hZlcxC8+zBVR9jRX81 6PEWfi8dPeT9LPDlE2yF6F0ZzeKeDfyeqvCPy9c9H5yFmh/UTALJ45/GiLO7VPtNbIKHfa VTWj5mEDNPufLMc52DhnOle8Pkt3iQdghxZ+JGfjc0AHHSXzSoWk/02jMezNtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755673190; a=rsa-sha256; cv=none; b=ZjwZu6iD/He4JjKLlQGeAdrKDHLf1DwNnFet2Am/d310WEF0YkoqQ+u+HaHQKeSeBFaHEn /iEpzMJXWf+7CqmlKHeqdhP3pdBPPAacE3l+rkk99NGtX/21b9Wnn+JKuMYPUNGamsKwyA KTlN0XE6RklH6VWsjdO6Zq31jd0ceZrsLYG/09Q0WdtiCB8t7g57UKvduddH935gPPiHYR ozo+LnSWYGvXtpE+WJshYfBNqX7oM40InFERCHT0xsMWuHmXie4sJ1paCd8IEvjvxrRVrg 1u2iPz6mnJb6BhFvdtAW2H8JkZ+/kYnQJT7E/TVGmFU4kNb/MyUCrz5wAEO6LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c6HPy1bdfz12M6; Wed, 20 Aug 2025 06:59:50 +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 57K6xojE024166; Wed, 20 Aug 2025 06:59:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57K6xoAr024163; Wed, 20 Aug 2025 06:59:50 GMT (envelope-from git) Date: Wed, 20 Aug 2025 06:59:50 GMT Message-Id: <202508200659.57K6xoAr024163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 0269dc575e83 - main - acpi_gpiobus: implement bus_child_location 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: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0269dc575e8321b0f0166ba1797a4a3cdc9ece7d Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=0269dc575e8321b0f0166ba1797a4a3cdc9ece7d commit 0269dc575e8321b0f0166ba1797a4a3cdc9ece7d Author: Ahmad Khalifa AuthorDate: 2025-08-20 06:10:02 +0000 Commit: Ahmad Khalifa CommitDate: 2025-08-20 06:52:11 +0000 acpi_gpiobus: implement bus_child_location Reviewed by: imp, andrew Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D51586 --- sys/dev/gpio/acpi_gpiobus.c | 17 +++++++++++++++++ sys/dev/gpio/gpiobus.c | 3 +-- sys/dev/gpio/gpiobus_internal.h | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/acpi_gpiobus.c b/sys/dev/gpio/acpi_gpiobus.c index a9a2238695f7..0d2455cab399 100644 --- a/sys/dev/gpio/acpi_gpiobus.c +++ b/sys/dev/gpio/acpi_gpiobus.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "gpiobus_if.h" @@ -411,6 +412,21 @@ acpi_gpiobus_add_child(device_t dev, u_int order, const char *name, int unit) sizeof(struct acpi_gpiobus_ivar))); } +static int +acpi_gpiobus_child_location(device_t bus, device_t child, struct sbuf *sb) +{ + struct acpi_gpiobus_ivar *devi; + int err; + + err = gpiobus_child_location(bus, child, sb); + if (err != 0) + return (err); + + devi = device_get_ivars(child); + sbuf_printf(sb, " handle=%s", acpi_name(devi->handle)); + return (0); +} + static device_method_t acpi_gpiobus_methods[] = { /* Device interface */ DEVMETHOD(device_probe, acpi_gpiobus_probe), @@ -420,6 +436,7 @@ static device_method_t acpi_gpiobus_methods[] = { /* Bus interface */ DEVMETHOD(bus_read_ivar, acpi_gpiobus_read_ivar), DEVMETHOD(bus_add_child, acpi_gpiobus_add_child), + DEVMETHOD(bus_child_location, acpi_gpiobus_child_location), DEVMETHOD_END }; diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c index 2f448ea3a956..5f1f6532a79b 100644 --- a/sys/dev/gpio/gpiobus.c +++ b/sys/dev/gpio/gpiobus.c @@ -57,7 +57,6 @@ static int gpiobus_suspend(device_t); static int gpiobus_resume(device_t); static void gpiobus_probe_nomatch(device_t, device_t); static int gpiobus_print_child(device_t, device_t); -static int gpiobus_child_location(device_t, device_t, struct sbuf *); static device_t gpiobus_add_child(device_t, u_int, const char *, int); static void gpiobus_hinted_child(device_t, const char *, int); @@ -662,7 +661,7 @@ gpiobus_print_child(device_t dev, device_t child) return (retval); } -static int +int gpiobus_child_location(device_t bus, device_t child, struct sbuf *sb) { struct gpiobus_ivar *devi; diff --git a/sys/dev/gpio/gpiobus_internal.h b/sys/dev/gpio/gpiobus_internal.h index 82f1354d9e75..c198e5f79989 100644 --- a/sys/dev/gpio/gpiobus_internal.h +++ b/sys/dev/gpio/gpiobus_internal.h @@ -42,6 +42,7 @@ void gpiobus_free_ivars(struct gpiobus_ivar *); int gpiobus_read_ivar(device_t, device_t, int, uintptr_t *); int gpiobus_acquire_pin(device_t, uint32_t); void gpiobus_release_pin(device_t, uint32_t); +int gpiobus_child_location(device_t, device_t, struct sbuf *); device_t gpiobus_add_child_common(device_t, u_int, const char *, int, size_t); extern driver_t gpiobus_driver;