From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Samuel Holland <samuel.holland@sifive.com>
Cc: Stephen Boyd <sboyd@kernel.org>,
Guenter Roeck <linux@roeck-us.net>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Dinh Nguyen <dinguyen@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Michael Turquette <mturquette@baylibre.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Rob Herring <robh@kernel.org>,
Yang Li <yang.lee@linux.alibaba.com>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH] clk: sifive: Do not register clkdevs for PRCI clocks
Date: Tue, 28 May 2024 09:04:23 +0100 [thread overview]
Message-ID: <ZlWQB1q+8cE+mOAN@shell.armlinux.org.uk> (raw)
In-Reply-To: <20240528001432.1200403-1-samuel.holland@sifive.com>
On Mon, May 27, 2024 at 05:14:12PM -0700, Samuel Holland wrote:
> These clkdevs were unnecessary, because systems using this driver always
> look up clocks using the devicetree. And as Russell King points out[1],
> since the provided device name was truncated, lookups via clkdev would
> never match.
There is another reason they would never match - clkdev has always been
about matching the clock _consumer_ using the device name and connection
name to the producer. The device and connection name passed into clkdev
should always be the consumer (it's documented as such.)
Providing the producer device name to clkdev when registering an entry
will mean that clk_get(consumer_dev, consumer_name) will fail to find
the entry in clkdev's table, and thus fail to find the clock.
So, this code has been incorrect from the very start.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2024-05-28 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 0:14 [PATCH] clk: sifive: Do not register clkdevs for PRCI clocks Samuel Holland
2024-05-28 8:04 ` Russell King (Oracle) [this message]
2024-05-28 8:17 ` Russell King (Oracle)
2024-05-29 20:53 ` Stephen Boyd
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=ZlWQB1q+8cE+mOAN@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=angelogioacchino.delregno@collabora.com \
--cc=dinguyen@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@roeck-us.net \
--cc=mturquette@baylibre.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=samuel.holland@sifive.com \
--cc=sboyd@kernel.org \
--cc=yang.lee@linux.alibaba.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