Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.84.56 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796041734; b=kzREB2nEHUCzbxm8wamtPWOpjnLIOhqaGR/eKd88a3KvK99Mhih4GFe1/evfhP5k4+Rx MSyKCILHfEdIt53+rbAODXCkRaXX0picN11t7WI1A4V9OG/brddbXRNSi4JQ5N1CQ64eF uhbDa3v/7uGLG/oUlMrjU1357kzmryuyqvlxeswaLUr7meqkgtMh/E2le1bJTrDmuSuac Dx2UDVbAp0mnNpXF7lSvnimoCLrw0kNaOUhwXpI95Km+HlgNKj1s/CYol2PA5yivj1msE 9fCcRwmQPpN8sZ419fdortb1uwjcdJFxIDjk/J6WZQCIwv6w2+hAzuDp0RIbP2Mocuw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796041734; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:From:To:Cc: Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=BmfhWQepL4r0rUInHLUE7jCiVod7len4V/bs+t69cK0=; b=DfO2E0ygeiW9/gZYKJmSuGf7lycoiijjxJn1ARnWFiBCKFxXOXMnYtYrZ+Iz/NRRSCFS 53/eHGDZRgp7BO02W2Qy7beD70nyFXlIlwJ3PA3T7Tb6t+lUxaNCwnQitXK30qewZOQm3 gc9xLnRHnHXcH3aSo2kezx4mzW5b6mqKMu+vu8SLf+bGV0UdyCf9vafuSoFvLZ7H6mqph NO0ybNz8fJ8afk+ClFESVXl8CmgvZBhFijkKrE6Ie6Aa20+/4RY63aidkW2M6uyFNMU6I id0IT/9u3OC/uI+tMxAKpCTLKdH1VM/oXHhgIlRCTpGfEBEl4d1z+9bdP3ZhFAdmy9Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=LVgpjWqn; arc=none smtp.remote-ip=185.246.84.56 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 3CED1606A320 for ; Mon, 30 Nov 2026 12:28:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3CED1606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=LVgpjWqn Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 8529E1A1888; Mon, 30 Nov 2026 12:28:45 +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-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 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