Re: [PATCH v8 00/16] clk: provide new devm helpers for prepared and enabled clocks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH v8 00/16] clk: provide new devm helpers for prepared and enabled clocks
- From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
- Date: Tue, 15 Mar 2022 20:03:44 +0200
- Cc: Michael Turquette <mturquette@xxxxxxxxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Nuno Sá <nuno.sa@xxxxxxxxxx>, Jean Delvare <jdelvare@xxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>, Lars Povlsen <lars.povlsen@xxxxxxxxxxxxx>, Steen Hegelund <Steen.Hegelund@xxxxxxxxxxxxx>, Microchip Linux Driver Support <UNGLinuxDriver@xxxxxxxxxxxxx>, linux-hwmon@xxxxxxxxxxxxxxx, linux-arm Mailing List <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, Lars-Peter Clausen <lars@xxxxxxxxxx>, Michael Hennerich <Michael.Hennerich@xxxxxxxxxx>, Jonathan Cameron <jic23@xxxxxxxxxx>, Matt Mackall <mpm@xxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, Bartosz Golaszewski <brgl@xxxxxxxx>, Neil Armstrong <narmstrong@xxxxxxxxxxxx>, David Airlie <airlied@xxxxxxxx>, Daniel Vetter <daniel@xxxxxxxx>, Kevin Hilman <khilman@xxxxxxxxxxxx>, Jerome Brunet <jbrunet@xxxxxxxxxxxx>, Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>, Paul Cercueil <paul@xxxxxxxxxxxxxxx>, Alessandro Zummo <a.zummo@xxxxxxxxxxxx>, Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>, Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>, Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, Lee Jones <lee.jones@xxxxxxxxxx>, Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>, Oleksij Rempel <linux@xxxxxxxxxxxxxxxx>, Shawn Guo <shawnguo@xxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>, NXP Linux Team <linux-imx@xxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Vinod Koul <vkoul@xxxxxxxxxx>, linux-clk <linux-clk@xxxxxxxxxxxxxxx>, Sascha Hauer <kernel@xxxxxxxxxxxxxx>, Vladimir Zapolskiy <vz@xxxxxxxxx>, Heiko Stuebner <heiko@xxxxxxxxx>, Tomislav Denis <tomislav.denis@xxxxxxx>, Anand Ashok Dumbre <anand.ashok.dumbre@xxxxxxxxxx>, Michal Simek <michal.simek@xxxxxxxxxx>, André Gustavo Nakagomi Lopez <andregnl@xxxxxx>, Cai Huoqing <caihuoqing@xxxxxxxxx>, linux-iio <linux-iio@xxxxxxxxxxxxxxx>, linux-crypto <linux-crypto@xxxxxxxxxxxxxxx>, linux-amlogic <linux-amlogic@xxxxxxxxxxxxxxxxxxx>, "open list:GPIO SUBSYSTEM" <linux-gpio@xxxxxxxxxxxxxxx>, dri-devel <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, "open list:BROADCOM NVRAM DRIVER" <linux-mips@xxxxxxxxxxxxxxx>, "open list:REAL TIME CLOCK (RTC) SUBSYSTEM" <linux-rtc@xxxxxxxxxxxxxxx>, Keguang Zhang <keguang.zhang@xxxxxxxxx>, Andy Gross <agross@xxxxxxxxxx>, Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>, Patrice Chotard <patrice.chotard@xxxxxxxxxxx>, Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx>, Alexandre Torgue <alexandre.torgue@xxxxxxxxxxx>, Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@xxxxxxxxxxxxx>, linux-watchdog@xxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx, linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx, linux-pwm@xxxxxxxxxxxxxxx, linux-i2c <linux-i2c@xxxxxxxxxxxxxxx>, linux-spi <linux-spi@xxxxxxxxxxxxxxx>, Amireddy Mallikarjuna reddy <mallikarjunax.reddy@xxxxxxxxxxxxxxx>, dmaengine <dmaengine@xxxxxxxxxxxxxxx>
- In-reply-to: <20220314141643.22184-1-u.kleine-koenig@pengutronix.de>
- References: <20220314141643.22184-1-u.kleine-koenig@pengutronix.de>
On Mon, Mar 14, 2022 at 5:14 PM Uwe Kleine-König
<u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
>
> Hello,
>
> this is another try to convince the relevant people that
> devm_clk_get_enabled() is a nice idea. Compared to v7 (back in May 2021) this
> series is rebased to v5.17-rc8 and converts quite some drivers that open code
> devm_clk_get_enabled() up to now (patches #3 - #11).
>
> A concern about devm_clk_get_enabled() in v7 was that it helps people to be
> lazy and I agree that in some situations when devm_clk_get_enabled() is used it
> would be more efficient and sensible to care to only enable the clk when really
> needed.
>
> On the other hand, the function is right for some users, e.g. the watchdog
> drivers. For the others it's not so simple to judge. Given that there are a
> lot of drivers that are lazy even if doing so is some effort (i.e. calling
> clk_prepare_enable() and devm_add_action()) convinces me, that introducing the
> function family is sensible. (And if you want to work on these drivers,
> grepping for devm_clk_get_enabled gives you a few candidates once the
> series is in :-)
FWIW,
Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
for drivers/iio
Thanks for doing this!
> Otherwise looking at the diffstat of this series:
>
> 48 files changed, 257 insertions(+), 851 deletions(-)
>
> is quite convincing. Just the first two patches (which introduce the new
> functions) account for
>
> 2 files changed, 169 insertions(+), 17 deletions(-)
>
> . A rough third of the added lines is documentation. The rest is driver
> updates which then has:
>
> 46 files changed, 88 insertions(+), 834 deletions(-)
>
> which makes a really nice cleanup.
>
> The series is build-tested on arm64, m68k, powerpc, riscv, s390, sparc64
> and x86_64 using an allmodconfig.
>
> Best regards
> Uwe
>
> Uwe Kleine-König (16):
> clk: generalize devm_clk_get() a bit
> clk: Provide new devm_clk helpers for prepared and enabled clocks
> hwmon: Make use of devm_clk_get_enabled()
> iio: Make use of devm_clk_get_enabled()
> hwrng: meson - Don't open-code devm_clk_get_optional_enabled()
> bus: bt1: Don't open code devm_clk_get_enabled()
> gpio: vf610: Simplify error handling in probe
> drm/meson: dw-hdmi: Don't open code devm_clk_get_enabled()
> rtc: ingenic: Simplify using devm_clk_get_enabled()
> clk: meson: axg-audio: Don't duplicate devm_clk_get_enabled()
> watchdog: Make use of devm_clk_get_enabled()
> pwm: atmel: Simplify using devm_clk_get_prepared()
> rtc: at91sam9: Simplify using devm_clk_get_enabled()
> i2c: imx: Simplify using devm_clk_get_enabled()
> spi: davinci: Simplify using devm_clk_get_enabled()
> dmaengine: lgm: Fix error handling
>
> drivers/bus/bt1-apb.c | 23 +------
> drivers/bus/bt1-axi.c | 23 +------
> drivers/char/hw_random/meson-rng.c | 20 +-----
> drivers/clk/clk-devres.c | 96 ++++++++++++++++++++++-----
> drivers/clk/meson/axg-audio.c | 36 ++--------
> drivers/dma/lgm/lgm-dma.c | 8 +--
> drivers/gpio/gpio-vf610.c | 45 +++----------
> drivers/gpu/drm/meson/meson_dw_hdmi.c | 48 +++++---------
> drivers/hwmon/axi-fan-control.c | 15 +----
> drivers/hwmon/ltc2947-core.c | 17 +----
> drivers/hwmon/mr75203.c | 26 +-------
> drivers/hwmon/sparx5-temp.c | 19 +-----
> drivers/i2c/busses/i2c-imx.c | 12 +---
> drivers/iio/adc/ad7124.c | 15 +----
> drivers/iio/adc/ad7768-1.c | 17 +----
> drivers/iio/adc/ad9467.c | 17 +----
> drivers/iio/adc/ingenic-adc.c | 15 +----
> drivers/iio/adc/lpc18xx_adc.c | 18 +----
> drivers/iio/adc/rockchip_saradc.c | 44 +-----------
> drivers/iio/adc/ti-ads131e08.c | 19 +-----
> drivers/iio/adc/xilinx-ams.c | 15 +----
> drivers/iio/adc/xilinx-xadc-core.c | 18 +----
> drivers/iio/frequency/adf4371.c | 17 +----
> drivers/iio/frequency/admv1013.c | 15 +----
> drivers/iio/frequency/adrf6780.c | 16 +----
> drivers/iio/imu/adis16475.c | 15 +----
> drivers/pwm/pwm-atmel.c | 16 +----
> drivers/rtc/rtc-at91sam9.c | 22 ++----
> drivers/rtc/rtc-jz4740.c | 21 +-----
> drivers/spi/spi-davinci.c | 11 +--
> drivers/watchdog/cadence_wdt.c | 17 +----
> drivers/watchdog/davinci_wdt.c | 18 +----
> drivers/watchdog/imgpdc_wdt.c | 31 +--------
> drivers/watchdog/imx2_wdt.c | 15 +----
> drivers/watchdog/imx7ulp_wdt.c | 15 +----
> drivers/watchdog/loongson1_wdt.c | 17 +----
> drivers/watchdog/lpc18xx_wdt.c | 30 +--------
> drivers/watchdog/meson_gxbb_wdt.c | 16 +----
> drivers/watchdog/of_xilinx_wdt.c | 16 +----
> drivers/watchdog/pic32-dmt.c | 15 +----
> drivers/watchdog/pic32-wdt.c | 17 +----
> drivers/watchdog/pnx4008_wdt.c | 15 +----
> drivers/watchdog/qcom-wdt.c | 16 +----
> drivers/watchdog/rtd119x_wdt.c | 16 +----
> drivers/watchdog/st_lpc_wdt.c | 16 +----
> drivers/watchdog/stm32_iwdg.c | 31 +--------
> drivers/watchdog/visconti_wdt.c | 18 +----
> include/linux/clk.h | 90 ++++++++++++++++++++++++-
> 48 files changed, 257 insertions(+), 851 deletions(-)
>
>
> base-commit: 09688c0166e76ce2fb85e86b9d99be8b0084cdf9
> --
> 2.35.1
>
--
With Best Regards,
Andy Shevchenko
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|