Re: [PATCH v2 00/65] clk: Make determine_rate mandatory for muxes

2023-03-22 Thread Stephen Boyd
Quoting Maxime Ripard (2023-03-22 03:01:53)
> Hi Stephen,
> 
> On Tue, Mar 21, 2023 at 04:55:03PM -0700, Stephen Boyd wrote:
> > Quoting Maxime Ripard (2022-11-04 06:17:17)
> > > Hi,
> > > 
> > > This is a follow-up to a previous series that was printing a warning
> > > when a mux has a set_parent implementation but is missing
> > > determine_rate().
> > > 
> > > The rationale is that set_parent() is very likely to be useful when
> > > changing the rate, but it's determine_rate() that takes the parenting
> > > decision. If we're missing it, then the current parent is always going
> > > to be used, and thus set_parent() will not be used. The only exception
> > > being a direct call to clk_set_parent(), but those are fairly rare
> > > compared to clk_set_rate().
> > > 
> > > Stephen then asked to promote the warning to an error, and to fix up all
> > > the muxes that are in that situation first. So here it is :)
> > > 
> > > Let me know what you think,
> > 
> > What's the plan here? Are you going to resend?
> 
> It wasn't clear to me whether or not this was something that you wanted,
> and I got some pushback on the drivers so I kind of forgot about it.
> 
> If you do want it (and it looks like you do), I'll resend it.

Let me read the whole series first. I was ignoring it because I was
assuming it was going to be resent.


Re: [PATCH v2 00/65] clk: Make determine_rate mandatory for muxes

2023-03-22 Thread Maxime Ripard
Hi Stephen,

On Tue, Mar 21, 2023 at 04:55:03PM -0700, Stephen Boyd wrote:
> Quoting Maxime Ripard (2022-11-04 06:17:17)
> > Hi,
> > 
> > This is a follow-up to a previous series that was printing a warning
> > when a mux has a set_parent implementation but is missing
> > determine_rate().
> > 
> > The rationale is that set_parent() is very likely to be useful when
> > changing the rate, but it's determine_rate() that takes the parenting
> > decision. If we're missing it, then the current parent is always going
> > to be used, and thus set_parent() will not be used. The only exception
> > being a direct call to clk_set_parent(), but those are fairly rare
> > compared to clk_set_rate().
> > 
> > Stephen then asked to promote the warning to an error, and to fix up all
> > the muxes that are in that situation first. So here it is :)
> > 
> > Let me know what you think,
> 
> What's the plan here? Are you going to resend?

It wasn't clear to me whether or not this was something that you wanted,
and I got some pushback on the drivers so I kind of forgot about it.

If you do want it (and it looks like you do), I'll resend it.

Maxime


signature.asc
Description: PGP signature


Re: [PATCH v2 00/65] clk: Make determine_rate mandatory for muxes

2023-03-21 Thread Stephen Boyd
Quoting Maxime Ripard (2022-11-04 06:17:17)
> Hi,
> 
> This is a follow-up to a previous series that was printing a warning
> when a mux has a set_parent implementation but is missing
> determine_rate().
> 
> The rationale is that set_parent() is very likely to be useful when
> changing the rate, but it's determine_rate() that takes the parenting
> decision. If we're missing it, then the current parent is always going
> to be used, and thus set_parent() will not be used. The only exception
> being a direct call to clk_set_parent(), but those are fairly rare
> compared to clk_set_rate().
> 
> Stephen then asked to promote the warning to an error, and to fix up all
> the muxes that are in that situation first. So here it is :)
> 
> Let me know what you think,

What's the plan here? Are you going to resend?


[PATCH v2 00/65] clk: Make determine_rate mandatory for muxes

2022-11-04 Thread Maxime Ripard
Hi,

This is a follow-up to a previous series that was printing a warning
when a mux has a set_parent implementation but is missing
determine_rate().

The rationale is that set_parent() is very likely to be useful when
changing the rate, but it's determine_rate() that takes the parenting
decision. If we're missing it, then the current parent is always going
to be used, and thus set_parent() will not be used. The only exception
being a direct call to clk_set_parent(), but those are fairly rare
compared to clk_set_rate().

Stephen then asked to promote the warning to an error, and to fix up all
the muxes that are in that situation first. So here it is :)

Let me know what you think,
Maxime

To: Michael Turquette 
To: Stephen Boyd 
To: Andreas Färber 
To: Manivannan Sadhasivam 
To: Nicolas Ferre 
To: Alexandre Belloni 
To: Claudiu Beznea 
To: Max Filippov 
To: Charles Keepax 
To: Richard Fitzgerald 
To: Maxime Coquelin 
To: Alexandre Torgue 
To: Luca Ceresoli 
To: David Lechner 
To: Sekhar Nori 
To: Abel Vesa 
To: Shawn Guo 
To: Sascha Hauer 
To: Pengutronix Kernel Team 
To: Fabio Estevam 
To: NXP Linux Team 
To: Matthias Brugger 
To: Geert Uytterhoeven 
To: Dinh Nguyen 
To: Peter De Schrijver 
To: Prashant Gaikwad 
To: Thierry Reding 
To: Jonathan Hunter 
To: Ulf Hansson 
To: Linus Walleij 
To: David Airlie 
To: Daniel Vetter 
To: Vinod Koul 
To: Kishon Vijay Abraham I 
To: Alessandro Zummo 
To: Chen-Yu Tsai 
To: Jernej Skrabec 
To: Samuel Holland 
To: Liam Girdwood 
To: Mark Brown 
To: Jaroslav Kysela 
To: Takashi Iwai 
To: Paul Cercueil 
To: Orson Zhai 
To: Baolin Wang 
To: Chunyan Zhang 
Cc: linux-...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Cc: AngeloGioacchino Del Regno 
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-acti...@lists.infradead.org
Cc: patc...@opensource.cirrus.com
Cc: linux-st...@st-md-mailman.stormreply.com
Cc: linux-media...@lists.infradead.org
Cc: linux-renesas-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-...@lists.infradead.org
Cc: linux-...@vger.kernel.org
Cc: linux-su...@lists.linux.dev
Cc: alsa-de...@alsa-project.org
Cc: linux-m...@vger.kernel.org
Signed-off-by: Maxime Ripard 
---
Changes in v2:
- Drop all the patches already applied
- Promote the clk registration warning to an error
- Make all muxes use determine_rate
- Link to v1: 
https://lore.kernel.org/r/20221018-clk-range-checks-fixes-v1-0-f3ef80518...@cerno.tech

---
Maxime Ripard (65):
  clk: Export clk_hw_forward_rate_request()
  clk: lan966x: Remove unused round_rate hook
  clk: nodrv: Add a determine_rate hook
  clk: test: Add a determine_rate hook
  clk: actions: composite: Add a determine_rate hook for pass clk
  clk: at91: main: Add a determine_rate hook
  clk: at91: sckc: Add a determine_rate hook
  clk: berlin: div: Add a determine_rate hook
  clk: cdce706: Add a determine_rate hook
  clk: k210: pll: Add a determine_rate hook
  clk: k210: aclk: Add a determine_rate hook
  clk: k210: mux: Add a determine_rate hook
  clk: lmk04832: clkout: Add a determine_rate hook
  clk: lochnagar: Add a determine_rate hook
  clk: qoriq: Add a determine_rate hook
  clk: si5341: Add a determine_rate hook
  clk: stm32f4: mux: Add a determine_rate hook
  clk: vc5: mux: Add a determine_rate hook
  clk: vc5: clkout: Add a determine_rate hook
  clk: wm831x: clkout: Add a determine_rate hook
  clk: davinci: da8xx-cfgchip: Add a determine_rate hook
  clk: davinci: da8xx-cfgchip: Add a determine_rate hook
  clk: imx: busy: Add a determine_rate hook
  clk: imx: fixup-mux: Add a determine_rate hook
  clk: imx: scu: Add a determine_rate hook
  clk: mediatek: cpumux: Add a determine_rate hook
  clk: pxa: Add a determine_rate hook
  clk: renesas: r9a06g032: Add a determine_rate hook
  clk: socfpga: gate: Add a determine_rate hook
  clk: stm32: core: Add a determine_rate hook
  clk: tegra: bpmp: Add a determine_rate hook
  clk: tegra: super: Add a determine_rate hook
  clk: tegra: periph: Add a determine_rate hook
  clk: ux500: prcmu: Add a determine_rate hook
  clk: ux500: sysctrl: Add a determine_rate hook
  clk: versatile: sp810: Add a determine_rate hook
  drm/tegra: sor: Add a determine_rate hook
  phy: cadence: sierra: Add a determine_rate hook
  phy: cadence: torrent: Add a determine_rate hook
  phy: ti: am654-serdes: Add a determine_rate hook
  phy: ti: j721e-wiz: Add a determine_rate hook
  rtc: sun6i: Add a determine_rate hook
  ASoC: tlv320aic32x4: Add a determine_rate hook
  clk: actions: composite: div: Switch to determine_rate
  clk: actions: composite: fact: Switch to determine_rate
  clk: at91: smd: Switch to determine_rate
  clk: axi-clkgen: Switch to determine_rate
  clk: cdce706: divider: Switch to determine_rate
  clk: cdce706: clkout: Switch to determine_rate
  clk: