From: Stephen Boyd <sboyd@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>,
Nikita Shubin <nikita.shubin@maquefel.me>,
Nikita Shubin via B4 Relay
<devnull+nikita.shubin.maquefel.me@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v10 03/38] clk: ep93xx: add DT support for Cirrus EP93xx
Date: Wed, 10 Jul 2024 12:56:33 -0700 [thread overview]
Message-ID: <a2a41f77c854b2399a0d87142c5bfe39.sboyd@kernel.org> (raw)
In-Reply-To: <7f2bf860ffaccd10899b72fdda6a3ca9c50d2107.camel@maquefel.me>
Quoting Nikita Shubin (2024-07-10 03:34:12)
> Hello Stephen!
>
> On Mon, 2024-07-08 at 15:18 -0700, Stephen Boyd wrote:
> > Quoting Nikita Shubin via B4 Relay (2024-06-17 02:36:37)
> > > diff --git a/drivers/clk/clk-ep93xx.c b/drivers/clk/clk-ep93xx.c
> > > new file mode 100644
> > > index 000000000000..a0430a5ae4da
> > > --- /dev/null
> > > +++ b/drivers/clk/clk-ep93xx.c
> > > @@ -0,0 +1,834 @@
> > > +// SPDX-License-Identifier: GPL-2.0-or-later
> > > +/*
> > [...]
> > > +
> > > +static int ep93xx_clk_enable(struct clk_hw *hw)
> > > +{
> > > + struct ep93xx_clk *clk = ep93xx_clk_from(hw);
> > > + struct ep93xx_clk_priv *priv = ep93xx_priv_from(clk);
> > > + u32 val;
> > > +
> > > + guard(spinlock_irqsave)(&priv->lock);
> >
> > I thought guard() was most important when there were multiple exit
> > paths
> > from a function, but OK.
> >
> > > +
> > [...]
> > > +
> > > +static int ep93xx_plls_init(struct ep93xx_clk_priv *priv)
> > > +{
> > > + const char fclk_divisors[] = { 1, 2, 4, 8, 16, 1, 1, 1 };
> > > + const char hclk_divisors[] = { 1, 2, 4, 5, 6, 8, 16, 32 };
> > [...]
> > > + if (!(value & EP93XX_SYSCON_CLKSET2_NBYP2))
> > > + clk_pll2_rate = EP93XX_EXT_CLK_RATE;
> > > + else if (value & EP93XX_SYSCON_CLKSET2_PLL2_EN)
> > > + clk_pll2_rate = calc_pll_rate(EP93XX_EXT_CLK_RATE,
> > > value);
> > > + else
> > > + clk_pll2_rate = 0;
> > > +
> > > + hw = devm_clk_hw_register_fixed_rate(dev, "pll2", "xtali",
> > > 0, clk_pll2_rate);
> >
> > Please use clk_parent_data for topology descriptions.
>
> It's look like clk_hw_register_fixed_rate_parent_hw() is missing devm_
> version of this function. Is it ok to provide wrapper for
> __clk_hw_register_fixed_rate() in drivers/clk/clk-ep93xx.c ?
>
It's not very hard to put it in the header file though, so why not
implement the wrapper in include/linux/clk-provider.h like
devm_clk_hw_register_fixed_rate()?
next prev parent reply other threads:[~2024-07-10 19:56 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 9:36 [PATCH v10 00/38] ep93xx device tree conversion Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 01/38] gpio: ep93xx: split device in multiple Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 02/38] ARM: ep93xx: add regmap aux_dev Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 03/38] clk: ep93xx: add DT support for Cirrus EP93xx Nikita Shubin via B4 Relay
2024-07-08 22:18 ` Stephen Boyd
2024-07-09 15:30 ` Nikita Shubin
2024-07-10 10:34 ` Nikita Shubin
2024-07-10 19:55 ` Stephen Boyd
2024-07-10 19:56 ` Stephen Boyd [this message]
2024-06-17 9:36 ` [PATCH v10 04/38] pinctrl: add a Cirrus ep93xx SoC pin controller Nikita Shubin via B4 Relay
2024-06-18 10:27 ` Linus Walleij
2024-06-18 16:29 ` Nikita Shubin
2024-06-17 9:36 ` [PATCH v10 05/38] power: reset: Add a driver for the ep93xx reset Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 06/38] dt-bindings: soc: Add Cirrus EP93xx Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 07/38] soc: Add SoC driver for Cirrus ep93xx Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 08/38] dt-bindings: dma: Add Cirrus EP93xx Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 09/38] dmaengine: cirrus: Convert to DT for " Nikita Shubin via B4 Relay
2024-06-24 5:48 ` Vinod Koul
2024-06-17 9:36 ` [PATCH v10 10/38] dt-bindings: watchdog: Add Cirrus EP93x Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 11/38] watchdog: ep93xx: add DT support for Cirrus EP93xx Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 12/38] dt-bindings: pwm: Add " Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 13/38] pwm: ep93xx: add DT support for " Nikita Shubin via B4 Relay
2024-06-17 11:00 ` Andy Shevchenko
2024-06-17 9:36 ` [PATCH v10 14/38] dt-bindings: spi: Add " Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 15/38] spi: ep93xx: add DT support for " Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 16/38] dt-bindings: net: Add " Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 17/38] net: cirrus: add DT support for " Nikita Shubin via B4 Relay
2024-06-18 12:46 ` Simon Horman
2024-06-18 16:37 ` Nikita Shubin
2024-06-17 9:36 ` [PATCH v10 18/38] dt-bindings: mtd: Add ts7200 nand-controller Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 19/38] mtd: rawnand: add support for ts72xx Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 20/38] dt-bindings: ata: Add Cirrus EP93xx Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 21/38] ata: pata_ep93xx: add device tree support Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 22/38] dt-bindings: input: Add Cirrus EP93xx keypad Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 23/38] input: keypad: ep93xx: add DT support for Cirrus EP93xx Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 24/38] wdt: ts72xx: add DT support for ts72xx Nikita Shubin via B4 Relay
2024-06-17 9:36 ` [PATCH v10 25/38] gpio: ep93xx: add DT support for gpio-ep93xx Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 26/38] ASoC: dt-bindings: ep93xx: Document DMA support Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 27/38] ASoC: dt-bindings: ep93xx: Document Audio Port support Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 28/38] ASoC: ep93xx: Drop legacy DMA support Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 29/38] ARM: dts: add Cirrus EP93XX SoC .dtsi Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 30/38] ARM: dts: ep93xx: add ts7250 board Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 31/38] ARM: dts: ep93xx: Add EDB9302 DT Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 32/38] ARM: ep93xx: DT for the Cirrus ep93xx SoC platforms Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 33/38] pwm: ep93xx: drop legacy pinctrl Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 34/38] ata: pata_ep93xx: remove legacy pinctrl use Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 35/38] ARM: ep93xx: delete all boardfiles Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 36/38] ARM: ep93xx: soc: drop defines Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 37/38] ASoC: cirrus: edb93xx: Delete driver Nikita Shubin via B4 Relay
2024-06-17 9:37 ` [PATCH v10 38/38] dmaengine: cirrus: remove platform code Nikita Shubin via B4 Relay
2024-06-24 5:48 ` Vinod Koul
2024-06-17 10:58 ` [PATCH v10 00/38] ep93xx device tree conversion Andy Shevchenko
2024-06-18 16:20 ` Nikita Shubin
2024-06-27 8:29 ` Nikita Shubin
2024-07-05 9:21 ` Uwe Kleine-König
2024-07-08 7:34 ` Nikita Shubin
2024-07-10 12:31 ` Arnd Bergmann
2024-07-10 13:48 ` Nikita Shubin
2024-07-09 13:58 ` Rob Herring
2024-07-09 15:22 ` Uwe Kleine-König
2024-06-18 14:33 ` Jakub Kicinski
2024-06-18 16:33 ` Nikita Shubin
2024-06-18 18:08 ` Jakub Kicinski
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=a2a41f77c854b2399a0d87142c5bfe39.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=arnd@arndb.de \
--cc=devnull+nikita.shubin.maquefel.me@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=nikita.shubin@maquefel.me \
/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