All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	linux-rtc@vger.kernel.org, linux-pwm@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Mark Brown <broonie@kernel.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	linux-clk@vger.kernel.org, Wolfram Sang <wsa@kernel.org>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Alexandru Ardelean <aardelean@deviqon.com>,
	kernel@pengutronix.de,
	Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-spi@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PULL] Add variants of devm_clk_get for prepared and enabled clocks enabled clocks
Date: Wed, 9 Jun 2021 22:21:23 +0200	[thread overview]
Message-ID: <20210609202123.u5rmw7al4x3rrvun@pengutronix.de> (raw)
In-Reply-To: <20210510174142.986250-1-u.kleine-koenig@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 2284 bytes --]

Hello Stephen,

given that I don't succeed in getting any feedback for my patch set, I'm
trying with a pull request today. It would be really great if this pull
request made it finally in for the next merge window.

The changes are not as bad or complex as the diffstat suggests. The
first patch contains all the complexity and only has
 1 file changed, 50 insertions(+), 17 deletions(-)
. The second patch makes use of this and just adds kernel-doc, four
functions that are one-line wrappers around the newly introduced
__devm_clk_get() function in the first patch and dummy implementations
for the !CONFIG_HAVE_CLK case.

The following changes since commit 6efb943b8616ec53a5e444193dccf1af9ad627b5:

  Linux 5.13-rc1 (2021-05-09 14:17:44 -0700)

are available in the Git repository at:

  https://git.pengutronix.de/git/ukl/linux tags/devm-clk-get-enabled

for you to fetch changes up to fec74d434d6f6016b6b2d5ab13aa28a0c657f5fb:

  clk: Provide new devm_clk_helpers for prepared and enabled clocks (2021-05-11 14:20:13 +0200)

----------------------------------------------------------------
New variants of devm_clk_get() for prepared and enabled clocks

These two patches create a set of new devm helpers that return clocks
already prepared or prepared-and-enabled. The automatic cleanup cares
for unpreparing and disabling+unpreparing respectively.

This allows to simplify various drivers as was demonstrated with
additional patches sent with the various revisions of this patch set.
See
https://lore.kernel.org/r/20210510174142.986250-1-u.kleine-koenig@pengutronix.de
for the last submission round. This pull request doesn't contain these
patches though.

----------------------------------------------------------------
Uwe Kleine-König (2):
      clk: generalize devm_clk_get() a bit
      clk: Provide new devm_clk_helpers for prepared and enabled clocks

 drivers/clk/clk-devres.c | 96 ++++++++++++++++++++++++++++++++++++++++--------
 include/linux/clk.h      | 90 ++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 169 insertions(+), 17 deletions(-)

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2021-06-09 20:21 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 17:41 [PATCH v7 0/6] clk: provide new devm helpers for prepared and enabled clocks Uwe Kleine-König
2021-05-10 17:41 ` Uwe Kleine-König
2021-05-10 17:41 ` [PATCH v7 1/6] clk: generalize devm_clk_get() a bit Uwe Kleine-König
2021-05-10 17:41   ` Uwe Kleine-König
2021-05-10 17:41 ` [PATCH v7 2/6] clk: Provide new devm_clk_helpers for prepared and enabled clocks Uwe Kleine-König
2021-05-10 17:41   ` Uwe Kleine-König
2021-05-10 17:41 ` [PATCH v7 3/6] pwm: atmel: Simplify using devm_clk_get_prepared() Uwe Kleine-König
2021-05-10 17:41 ` [PATCH v7 4/6] rtc: at91sam9: Simplify using devm_clk_get_enabled() Uwe Kleine-König
2021-05-10 17:41   ` Uwe Kleine-König
2021-05-10 17:41 ` [PATCH v7 5/6] i2c: imx: " Uwe Kleine-König
2021-05-10 17:41   ` Uwe Kleine-König
2021-05-10 17:41 ` [PATCH v7 6/6] spi: davinci: " Uwe Kleine-König
2021-05-11  7:58 ` [PATCH v7 0/6] clk: provide new devm helpers for prepared and enabled clocks Alexandru Ardelean
2021-05-11  7:58   ` Alexandru Ardelean
2021-05-24 11:09 ` Uwe Kleine-König
2021-05-24 11:09   ` Uwe Kleine-König
2021-06-09 20:21 ` Uwe Kleine-König [this message]
2021-06-25 17:14   ` [PULL] Add variants of devm_clk_get for prepared and enabled clocks " Uwe Kleine-König
2021-06-25 17:14     ` Uwe Kleine-König
2021-07-05  8:01     ` Uwe Kleine-König
2021-07-05  8:01       ` Uwe Kleine-König
2021-07-22  6:06       ` Uwe Kleine-König
2021-07-22  6:06         ` Uwe Kleine-König
2021-07-22  7:40         ` Wolfram Sang
2021-07-22  7:40           ` Wolfram Sang
2021-07-22  8:18           ` Uwe Kleine-König
2021-07-22  8:18             ` Uwe Kleine-König
2021-07-22 12:07             ` Wolfram Sang
2021-07-22 12:07               ` Wolfram Sang
     [not found]               ` <CAHp75VfC=s12Unw3+Cn0ag71mM5i90=Jbwj4nYwB5cPKiUTRSA@mail.gmail.com>
2021-07-23  9:13                 ` Uwe Kleine-König
2021-07-23  9:13                   ` Uwe Kleine-König
2021-07-26  9:18                   ` Claudiu.Beznea
2021-07-26  9:18                     ` Claudiu.Beznea
2021-07-26  9:52                     ` Andy Shevchenko
2021-07-26  9:52                       ` Andy Shevchenko
2021-07-26 12:32                       ` Wolfram Sang
2021-07-26 12:32                         ` Wolfram Sang
2021-07-26 13:28                         ` Andy Shevchenko
2021-07-26 13:28                           ` Andy Shevchenko
2021-07-26 17:40                           ` Wolfram Sang
2021-07-26 17:40                             ` Wolfram Sang
2021-07-28 20:25                     ` About clk maintainership [Was: Re: [PULL] Add variants of devm_clk_get for prepared and enabled clocks enabled clocks] Uwe Kleine-König
2021-07-28 20:25                       ` Uwe Kleine-König
2021-07-28 20:40                       ` Russell King (Oracle)
2021-07-28 20:40                         ` Russell King (Oracle)
2021-07-31  7:41                         ` Stephen Boyd
2021-07-31  7:41                           ` Stephen Boyd
2021-07-31  8:07                           ` Andy Shevchenko
2021-07-31  8:07                             ` Andy Shevchenko
2021-07-31 12:00                           ` Uwe Kleine-König
2021-07-31 12:00                             ` Uwe Kleine-König
2021-08-02  9:36                             ` Jonathan Cameron
2021-08-02  9:36                               ` Jonathan Cameron
2021-08-02  9:48                             ` Russell King (Oracle)
2021-08-02  9:48                               ` Russell King (Oracle)
2021-08-02 15:27                               ` Uwe Kleine-König
2021-08-02 15:27                                 ` Uwe Kleine-König
2021-08-02 16:38                                 ` Russell King (Oracle)
2021-08-02 16:38                                   ` Russell King (Oracle)
2021-08-02 17:13                                   ` Andy Shevchenko
2021-08-02 17:13                                     ` Andy Shevchenko
2021-08-02 20:28                                     ` Russell King (Oracle)
2021-08-02 20:28                                       ` Russell King (Oracle)
2021-08-03  8:11                                   ` Stephen Boyd
2021-08-03  8:11                                     ` Stephen Boyd
2021-08-03 10:40                                     ` Uwe Kleine-König
2021-08-03 10:40                                       ` Uwe Kleine-König
2021-08-06  0:26                                       ` Stephen Boyd
2021-08-06  0:26                                         ` Stephen Boyd
2021-09-14 13:22                                         ` Uwe Kleine-König
2021-09-14 13:22                                           ` Uwe Kleine-König
2021-09-14 13:52                                           ` Mark Brown
2021-09-14 13:52                                             ` Mark Brown
2021-08-03  7:44                               ` Stephen Boyd
2021-08-03  7:44                                 ` 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=20210609202123.u5rmw7al4x3rrvun@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=a.zummo@towertech.it \
    --cc=aardelean@deviqon.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=claudiu.beznea@microchip.com \
    --cc=kernel@pengutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=mturquette@baylibre.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=o.rempel@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=wsa@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.