Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Cercueil <paul.cercueil@bootlin.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>, Russell King <linux@armlinux.org.uk>,
	Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>,
	Pawel Chmielewski <pawel.chmielewski@intel.com>
Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	acpica-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Paul Cercueil <paul.cercueil@bootlin.com>
Subject: [PATCH v6 0/2] ACPI: Add ACPI 6.5 fixed clock support
Date: Mon, 30 Nov 2026 13:28:25 +0100	[thread overview]
Message-ID: <20261130122827.157946-1-paul.cercueil@bootlin.com> (raw)

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



             reply	other threads:[~2026-11-30 13:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 12:28 Paul Cercueil [this message]
2026-11-30 12:28 ` [PATCH v6 1/2] ACPI: Add basic support for ACPI 6.5 fixed clock resources Paul Cercueil
2026-11-30 12:28 ` [PATCH v6 2/2] clk: Search clocks of ACPI device with its companion device Paul Cercueil
2026-11-30 16:44   ` kernel test robot
2026-11-30 17:15   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130122827.157946-1-paul.cercueil@bootlin.com \
    --to=paul.cercueil@bootlin.com \
    --cc=acpica-devel@lists.linux.dev \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maciej.wieczor-retman@intel.com \
    --cc=pawel.chmielewski@intel.com \
    --cc=rafael@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox