dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Ulf Hansson" <ulf.hansson@linaro.org>,
	"Prashant Gaikwad" <pgaikwad@nvidia.com>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Sekhar Nori" <nsekhar@ti.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	dri-devel@lists.freedesktop.org,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Paul Cercueil" <paul@crapouillou.net>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	linux-phy@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com,
	"Abel Vesa" <abelvesa@kernel.org>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Samuel Holland" <samuel@sholland.org>,
	"Chunyan Zhang" <zhang.lyra@gmail.com>,
	"Takashi Iwai" <tiwai@suse.com>,
	linux-tegra@vger.kernel.org,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"NXP Linux Team" <linux-imx@nxp.com>,
	"Orson Zhai" <orsonzhai@gmail.com>,
	linux-mips@vger.kernel.org,
	"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
	linux-sunxi@lists.linux.dev, linux-rtc@vger.kernel.org,
	linux-clk@vger.kernel.org,
	"Charles Keepax" <ckeepax@opensource.cirrus.com>,
	alsa-devel@alsa-project.org,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	linux-kernel@vger.kernel.org,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	linux-actions@lists.infradead.org,
	"Richard Fitzgerald" <rf@opensource.cirrus.com>,
	"Mark Brown" <broonie@kernel.org>,
	linux-mediatek@lists.infradead.org,
	"Baolin Wang" <baolin.wang@linux.alibaba.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Alessandro Zummo" <a.zummo@towertech.it>,
	"Stephen Boyd" <sboyd@kernel.org>,
	patches@opensource.cirrus.com,
	"Peter De Schrijver" <pdeschrijver@nvidia.com>,
	"Nicolas Ferre" <nicolas.ferre@microchip.com>,
	"Andreas Färber" <afaerber@suse.de>,
	linux-renesas-soc@vger.kernel.org,
	"Dinh Nguyen" <dinguyen@kernel.org>,
	"Vinod Koul" <vkoul@kernel.org>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"David Lechner" <david@lechnology.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Claudiu Beznea" <claudiu.beznea@microchip.com>
Subject: Re: [PATCH v2 34/65] clk: ux500: prcmu: Add a determine_rate hook
Date: Wed, 9 Nov 2022 12:05:48 +0100	[thread overview]
Message-ID: <20221109110548.4dcbkwx3jgjnhldw@houat> (raw)
In-Reply-To: <CACRpkdYwM6X8bBABCisUGX=P4F=hcFb7QLT3Cu7XUWUvV4TE1Q@mail.gmail.com>

Hi Linus,

On Tue, Nov 08, 2022 at 02:25:04PM +0100, Linus Walleij wrote:
> On Fri, Nov 4, 2022 at 2:32 PM Maxime Ripard <maxime@cerno.tech> wrote:
> 
> > The UX500 PRCMU "clkout" clock implements a mux with a set_parent hook,
> > but doesn't provide a determine_rate implementation.
> >
> > This is a bit odd, since set_parent() is there to, as its name implies,
> > change the parent of a clock. However, the most likely candidate to
> > trigger that parent change is a call to clk_set_rate(), with
> > determine_rate() figuring out which parent is the best suited for a
> > given rate.
> >
> > The other trigger would be a call to clk_set_parent(), but it's far less
> > used, and it doesn't look like there's any obvious user for that clock.
> >
> > So, the set_parent hook is effectively unused, possibly because of an
> > oversight. However, it could also be an explicit decision by the
> > original author to avoid any reparenting but through an explicit call to
> > clk_set_parent().
> 
> It is actually set up from the device tree, typically like this:
> 
> /* clkout1 from ACLK divided by 8 */
> clocks = <&clkout_clk DB8500_CLKOUT_1 DB8500_CLKOUT_SRC_ACLK 8>;
> 
> So the parent (source) and divisor comes in there.
> 
> clk->source and clk->divider is already set up when clk_hw_register() is
> called.

I wasn't aware that we had such bindings. AFAIUI, it looks redundant
with assigned-clock-rates and assigned-clock-parents, could we deprecate
it?

> So set/get_parent() is never used on clkout.
> 
> I think I just added the callbacks for completeness, should we delete them
> altogether?

I can't really test any of these platforms, so I'm a bit wary of making
such changes myself. Feel free to send a follow-up if you think it's
needed :)

> The patch is probably fine as-is as well so
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks!
Maxime

  reply	other threads:[~2022-11-09 11:06 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04 13:17 [PATCH v2 00/65] clk: Make determine_rate mandatory for muxes Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 01/65] clk: Export clk_hw_forward_rate_request() Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 02/65] clk: lan966x: Remove unused round_rate hook Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 03/65] clk: nodrv: Add a determine_rate hook Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 04/65] clk: test: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 05/65] clk: actions: composite: Add a determine_rate hook for pass clk Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 06/65] clk: at91: main: Add a determine_rate hook Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 07/65] clk: at91: sckc: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 08/65] clk: berlin: div: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 09/65] clk: cdce706: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 10/65] clk: k210: pll: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 11/65] clk: k210: aclk: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 12/65] clk: k210: mux: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 13/65] clk: lmk04832: clkout: " Maxime Ripard
2022-11-13 22:35   ` Liam Beguin
2022-11-04 13:17 ` [PATCH v2 14/65] clk: lochnagar: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 15/65] clk: qoriq: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 16/65] clk: si5341: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 17/65] clk: stm32f4: mux: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 18/65] clk: vc5: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 19/65] clk: vc5: clkout: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 20/65] clk: wm831x: " Maxime Ripard
2022-11-07 10:58   ` Charles Keepax
2022-11-04 13:17 ` [PATCH v2 21/65] clk: davinci: da8xx-cfgchip: " Maxime Ripard
2022-11-04 16:45   ` David Lechner
2022-11-07 12:06     ` Maxime Ripard
2022-11-07 14:52       ` David Lechner
2022-11-04 13:17 ` [PATCH v2 22/65] " Maxime Ripard
2022-11-04 16:46   ` David Lechner
2022-11-04 13:17 ` [PATCH v2 23/65] clk: imx: busy: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 24/65] clk: imx: fixup-mux: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 25/65] clk: imx: scu: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 26/65] clk: mediatek: cpumux: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 27/65] clk: pxa: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 28/65] clk: renesas: r9a06g032: " Maxime Ripard
2022-11-07  7:51   ` Geert Uytterhoeven
2022-11-04 13:17 ` [PATCH v2 29/65] clk: socfpga: gate: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 30/65] clk: stm32: core: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 31/65] clk: tegra: bpmp: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 32/65] clk: tegra: super: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 33/65] clk: tegra: periph: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 34/65] clk: ux500: prcmu: " Maxime Ripard
2022-11-08 13:25   ` Linus Walleij
2022-11-09 11:05     ` Maxime Ripard [this message]
2022-11-04 13:17 ` [PATCH v2 35/65] clk: ux500: sysctrl: " Maxime Ripard
2022-11-08 13:27   ` Linus Walleij
2022-11-10 11:28   ` Ulf Hansson
2022-11-10 11:39     ` Linus Walleij
2022-11-10 13:05       ` Ulf Hansson
2022-11-11  9:20         ` Linus Walleij
2022-11-14  9:05           ` Lee Jones
2022-11-04 13:17 ` [PATCH v2 36/65] clk: versatile: sp810: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 37/65] drm/tegra: sor: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 38/65] phy: cadence: sierra: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 39/65] phy: cadence: torrent: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 40/65] phy: ti: am654-serdes: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 41/65] phy: ti: j721e-wiz: " Maxime Ripard
2022-11-04 13:17 ` [PATCH v2 42/65] rtc: sun6i: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 43/65] ASoC: tlv320aic32x4: " Maxime Ripard
2022-11-04 15:44   ` Mark Brown
2022-11-04 15:51     ` Maxime Ripard
2022-11-04 15:59       ` Mark Brown
2022-11-07  8:43         ` Maxime Ripard
2022-11-07 12:06           ` Mark Brown
2022-11-07 15:26             ` Maxime Ripard
2022-11-07 16:02               ` Mark Brown
2023-03-22 23:31               ` Stephen Boyd
2023-03-29 19:50                 ` Maxime Ripard
2023-03-29 20:04                   ` Stephen Boyd
2022-11-04 13:18 ` [PATCH v2 44/65] clk: actions: composite: div: Switch to determine_rate Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 45/65] clk: actions: composite: fact: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 46/65] clk: at91: smd: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 47/65] clk: axi-clkgen: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 48/65] clk: cdce706: divider: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 49/65] clk: cdce706: clkout: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 50/65] clk: si5341: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 51/65] clk: si5351: pll: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 52/65] clk: si5351: msynth: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 53/65] clk: si5351: clkout: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 54/65] clk: da8xx: clk48: " Maxime Ripard
2022-11-04 16:49   ` David Lechner
2022-11-07 14:52     ` Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 55/65] clk: imx: scu: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 56/65] clk: ingenic: cgu: " Maxime Ripard
2022-11-04 14:31   ` Paul Cercueil
2022-11-04 14:59     ` Maxime Ripard
2022-11-04 17:35       ` Aidan MacDonald
2022-11-07  8:54         ` Maxime Ripard
2022-11-07 20:57           ` Aidan MacDonald
2022-11-09 11:00             ` Maxime Ripard
2023-03-22 23:41               ` Stephen Boyd
2023-03-23 15:35                 ` Aidan MacDonald
2023-03-24 11:19                   ` Maxime Ripard
2023-03-24 20:58                     ` Aidan MacDonald
2023-03-27 19:24                       ` Maxime Ripard
2023-04-05 12:57                         ` Paul Cercueil
2023-04-05 14:50                           ` Maxime Ripard
2023-04-05 15:29                             ` Paul Cercueil
2022-11-05 10:33       ` Paul Cercueil
2022-11-09 10:53         ` Maxime Ripard
2022-11-09 11:36           ` Paul Cercueil
2022-11-04 13:18 ` [PATCH v2 57/65] clk: ingenic: tcu: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 58/65] clk: sprd: composite: " Maxime Ripard
2022-11-09  2:43   ` Chunyan Zhang
2022-11-04 13:18 ` [PATCH v2 59/65] clk: st: flexgen: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 60/65] clk: stm32: composite: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 61/65] clk: tegra: periph: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 62/65] clk: tegra: super: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 63/65] ASoC: tlv320aic32x4: pll: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 64/65] ASoC: tlv320aic32x4: div: " Maxime Ripard
2022-11-04 13:18 ` [PATCH v2 65/65] clk: Warn if we register a mux without determine_rate Maxime Ripard
2022-11-07 10:56   ` Charles Keepax
2023-03-21 23:55 ` [PATCH v2 00/65] clk: Make determine_rate mandatory for muxes Stephen Boyd
2023-03-22 10:01   ` Maxime Ripard
2023-03-22 15:19     ` 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=20221109110548.4dcbkwx3jgjnhldw@houat \
    --to=maxime@cerno.tech \
    --cc=a.zummo@towertech.it \
    --cc=abelvesa@kernel.org \
    --cc=afaerber@suse.de \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=david@lechnology.com \
    --cc=dinguyen@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert+renesas@glider.be \
    --cc=jcmvbkbc@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=kernel@pengutronix.de \
    --cc=kishon@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-actions@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=mani@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=nsekhar@ti.com \
    --cc=orsonzhai@gmail.com \
    --cc=patches@opensource.cirrus.com \
    --cc=paul@crapouillou.net \
    --cc=pdeschrijver@nvidia.com \
    --cc=perex@perex.cz \
    --cc=pgaikwad@nvidia.com \
    --cc=rf@opensource.cirrus.com \
    --cc=s.hauer@pengutronix.de \
    --cc=samuel@sholland.org \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=tiwai@suse.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=wens@csie.org \
    --cc=zhang.lyra@gmail.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;
as well as URLs for NNTP newsgroup(s).