mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Cercueil <paul.cercueil@bootlin.com>
To: "Rafael J. Wysocki (Intel)" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>, Russell King <linux@armlinux.org.uk>,
	 linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v4 0/2] ACPI: platform: ACPI 6.5 fixed clock support
Date: Fri, 20 Nov 2026 16:14:37 +0100	[thread overview]
Message-ID: <fa5f43740321588aad8a5125eafd947c27a2f613.camel@bootlin.com> (raw)
In-Reply-To: <CAJZ5v0i4ybwsOKfj_LS_m7EL-AYAhPQJmLNWBm8gdZ5uvfcJug@mail.gmail.com>

Hi Rafael,

Le vendredi 20 novembre 2026 à 15:31 +0100, Rafael J. Wysocki (Intel) a écrit :
> On Fri, Nov 20, 2026 at 1:57 PM Paul Cercueil <paul.cercueil@bootlin.com>
> wrote:
> > 
> > Hi Rafael, Russell,
> > 
> > Here's the v4 of my patchset that adds partial support for ACPI 6.5
> > clock resources.
> > 
> > Sashiko complained about the clock names being too long still, as
> > ACPI device names can be up to 17 characters and the limit of clock
> > names is 16 characters; so I now name them "acpi-clkX".
> > 
> > Note that I expect warnings from Sashiko that I got on my v3 and didn't
> > correct, because they are bogus.
> > 
> > On the clkdev patch:
> > "When clk_find(dev_id, NULL) is called, does incrementing match here
> > give a (dev_id, con_id) entry a higher score than an exact
> > (dev_id, NULL) entry?"
> > 
> > My answer is that you call clk_find(dev_id, NULL) when you know you only
> > have one clock provided, so you don't need to care about matching
> > priorities.
> 
> Sashiko has a new comment on the first patch though:
> 
> https://sashiko.dev/#/patchset/20261120125722.209609-1-paul.cercueil%40bootlin.com

Yes, Sashiko came back to the charge with better arguments this time.

Sadly it seems to be correct, if I change the behaviour of clk_get(NULL) I will
break some drivers that rely on it not finding named clocks.

I can pass NULL as the con_id to clk_hw_register_clkdev() and then I can drop
the first patch. Then, I guess register any other clock for the same device with
the "acpi-clkX" con_id.

> > On the ACPI patch:
> > "Should the con_id argument to devm_clk_hw_register_clkdev() be NULL
> > instead of name? [...] Setting con_id to "<dev_name>-<idx>" instead of
> > NULL prevents wildcard connection matching in clk_find(), so any
> > consumer driver calling clk_get(dev, con_id) with a non-NULL con_id
> > fails with -ENOENT."
> 
> This time Sashiko complains about something else in this patch AFAICS
> (link above).

It looks like I need identifying names for devm_clk_hw_register_fixed_rate(),
and those don't need to be 16-chars long (that's only for clkdev) - so I'll
restore my "<ACPI_ID>-clkX" naming scheme there.

Cheers,
-Paul

      reply	other threads:[~2026-11-20 15:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 12:57 Paul Cercueil
2026-11-20 12:57 ` [PATCH v4 1/2] clkdev: Improve clock discovery with clk_find() Paul Cercueil
2026-11-20 12:57 ` [PATCH v4 2/2] ACPI: platform: Add basic support for ACPI 6.5 fixed clock resources Paul Cercueil
2026-11-20 14:24 ` [PATCH v4 0/2] ACPI: platform: ACPI 6.5 fixed clock support Rafael J. Wysocki (Intel)
2026-11-20 14:25   ` Rafael J. Wysocki (Intel)
2026-11-20 14:31 ` Rafael J. Wysocki (Intel)
2026-11-20 15:14   ` Paul Cercueil [this message]

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=fa5f43740321588aad8a5125eafd947c27a2f613.camel@bootlin.com \
    --to=paul.cercueil@bootlin.com \
    --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=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

all inboxes | Powered by JetHome®