From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.171.202.116 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796041735; b=ts1T5qBIVP3WQ8KzVjzqwfzyea759GbvkuPDkpBpJmL2SiN8SHqOeIJhieeP34N8yvzq E8XJXrJ73F0Q+NaCBAImwisSk15Lr8CShJ26JHQmZmn6dmG/+VEwNbwwiTRHX9Vc/KKdC Ced69frRXTnsSfKZ3dpi/fvnpvGUe7g+0MnCsW5sCCzhc9cGn+hk7XeObSt4H8Rkzannz gbqHXZ/q5k40kUYFt1pprsbVmXVj/W5uMdQ+1Q2mRVFYcoKBK+P3LTOEi5kRuga7m+ovo Iq5NxlcsZR6d78K++9YUw7CuPsgwCxLeAy1e+BsCJ8ALN3UZIosqrGZsRLEhky4CdQQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796041735; 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=k7k1Ex0r/jnEi7vKfN/L8Ioa2DdPuepNbYQTKGIVmIzehlxYcJjTfQuZJ4CV5L1DUxu7 jjJLStrbjBz7Otl4Xpp+0F4Vs9KdS2dmG/zdZtBWcYvHUJsKCsVIhR2uUy08xin8rVcmv ewSpsGBPClLWpJQkNMz1CXou7Efs0GZZu1fQzmaBa64kPPDbJrSeJPPrYY5eWaaOujunP dnLYOQLJI/zS6auBE8TxhuR1LiT/MPIiYAdR9n7EEGML6e1l2ITVyMb5AiAMk1SLZZiSo H1mTcAdgM+fkEODU+qkhRsZjrN0m+60JV32MlWMOWQuT+fg0SCD1qEuYlki2O0c7SYw== 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.171.202.116 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 C89FB606A32A for ; Mon, 30 Nov 2026 12:28:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C89FB606A32A 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-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-Mailing-List: linux-kernel@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