From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59341606A327 for ; Mon, 30 Nov 2026 13:52:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Kyw9FEPQ; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=LVgpjWqn DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Unsubscribe-Post:List-Owner; bh=BmfhWQepL4r0rUInHLUE7jCiVod7len4V/bs+t69cK0=; b=Kyw9FEPQQ0olfY6+Q1wwK6rqY0 gJoeRlQB80AtEm2ZBopfbaiRbnlV43X4cyBjBs3Xe9PtOxYOx3f0wJY0i9avJdjA42J9/qUCQI03b cCZvS8J2MtSODqJ2Tpxag3tmy2KeytSnIYxgEbL7lzI42TuhxVicYVqqAsUVBiPjbcNE7LgoWdK/H pBJ4k9j3cG6i2Nxf6/5y9h90bmZrArQ9GVw1vIV93RVoBbQxeb10e7FCv45XqWxgGE3uLzBrJrhap XlEb7JMcD8tVARHXSCCcILtZ19pJsqIvdfp0lh3POjYhCBq3i0olkvBHYFoK4sB/XgOie/qTQ3qPi XGjIcAxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY0V5-00000004Uhn-3aBW; Mon, 30 Nov 2026 12:28:57 +0000 Received: from smtpout-04.galae.net ([185.171.202.116]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY0V0-00000004Ue9-1V6N for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2026 12:28:54 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 8A953C2AC67; Mon, 30 Nov 2026 12:28:55 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 491106007C; Mon, 30 Nov 2026 12:28:45 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4B18211EA0222; Mon, 30 Nov 2026 13:28:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796041724; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=BmfhWQepL4r0rUInHLUE7jCiVod7len4V/bs+t69cK0=; b=LVgpjWqnqtMS8feZC9BtDkKR9xly7cQgV1gfDyAC9UW2NlWm8vSt1n6HZlH+qLFRxLhk3V bwAO5JBge5gMYnO7EtsDo2NUZEY9jB41u7IX55Z++GVM8scOfAtjWveBxse7ffyM9V8pXk sx61P/xR0hyx4ntGvFuEGUx0VVybpzWxQpHx8uTzi/0PSyfM65rQ4PwaxVRmGl2fsKyDIE AMkSxK/aGoop0AyQJtNzU+VfWBPWOu+NfwwwkaDGKMcRX+15XLTRlap/gYDmQ3caQW5eYs UuyxpFi00lDwxRw2LcDx4HpRxxYYBR5St0wJIDSxvG7CYANJGYSoASm9/B/mjw== From: Paul Cercueil To: "Rafael J . Wysocki" , Len Brown , Russell King , Maciej Wieczor-Retman , Pawel Chmielewski Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, acpica-devel@lists.linux.dev, linux-kernel@vger.kernel.org, Thomas Petazzoni , Paul Cercueil Subject: [PATCH v6 0/2] ACPI: Add ACPI 6.5 fixed clock support Date: Mon, 30 Nov 2026 13:28:25 +0100 Message-ID: <20261130122827.157946-1-paul.cercueil@bootlin.com> X-Mailer: git-send-email 2.47.3 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_042852_730542_590F797F X-CRM114-Status: GOOD ( 17.23 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi Rafael, Russell, Here's the v6 of my patchset that adds partial support for ACPI 6.5 clock resources. This v6 adds a patch to clkdev, which updates clk_get() to use the ACPI companion device if available, and fall back to the regular path if the clock wasn't found there. It also reworks the main patch, with quite a lot of changes, most notably the switch from using devm functions which can't be used there. This patchset was tested both for devices that are probed at boot, and also through hot-plugging of ACPI tables using configfs. The ACPI clocks are correctly probed when a new ACPI device is discovered, before the driver probes, and are correctly unregistered when the hot-plugged ACPI table is unloaded, after the driver is removed. Changes in v6: - [1/2]: - Return -EFAULT instead of -EINVAL on bad firmware data - Invert condition "res->type != ACPI_RESOURCE_TYPE_CLOCK_INPUT" - Rename acpi_platform_init_clocks() to acpi_dev_init_clocks(), and move it to drivers/acpi/resource.c - Make sure clock index is incremented even for non-fixed clocks - Use non-devm variants of the clk/clkdev APIs - Keep a list of the acpi_device's clk/clkdev data so that they can be unregistered on device removal - acpi_dev_init_clocks() is now called from acpi_bus_attach() - Add function acpi_dev_remove_clocks() to unregister the ACPI clocks, called on ACPI device removal - Add documentation for these two functions - Use acpi_handle_info() instead of dev_warn() - [2/2]: - New patch Cheers, -Paul Paul Cercueil (2): ACPI: Add basic support for ACPI 6.5 fixed clock resources clk: Search clocks of ACPI device with its companion device drivers/acpi/resource.c | 132 ++++++++++++++++++++++++++++++++++++++++ drivers/acpi/scan.c | 6 ++ drivers/clk/clkdev.c | 10 +++ include/acpi/acpi_bus.h | 1 + include/linux/acpi.h | 3 + 5 files changed, 152 insertions(+) -- 2.47.3