From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Russell King <linux@armlinux.org.uk>
Cc: linux-clk@vger.kernel.org, kernel@pengutronix.de,
Sean Anderson <sean.anderson@seco.com>,
Thierry Reding <thierry.reding@gmail.com>,
Michal Simek <michal.simek@amd.com>,
linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org
Subject: [PATCH 0/2] clk: Add a devm variant of clk_rate_exclusive_get()
Date: Tue, 12 Dec 2023 19:09:41 +0100 [thread overview]
Message-ID: <cover.1702403904.git.u.kleine-koenig@pengutronix.de> (raw)
Hello,
patch #1 adds a new function devm_clk_rate_exclusive_get() that
simplifies usage of clk_rate_exclusive_get() in probe functions.
One downside is that a caller of clk_rate_exclusive_get() doesn't need
to check the return value, devm_clk_rate_exclusive_get() can fail
however. So to benefit from the new function you usually need to add a
check for devm_clk_rate_exclusive_get() failing in return to simplifying
error paths in .probe() and .remove().
Patch #2 shows an example conversion. Note that without
devm_clk_rate_exclusive_get() the pwm-xilinx driver cannot benefit from
devm_pwmchip_add().
This series bases on
https://lore.kernel.org/linux-clk/cover.1702400947.git.u.kleine-koenig@pengutronix.de/T/#t
. That's not a "hard" dependency, it can easily be rebased to next.
There is only a trivial context conflict in include/linux/clk.h.
Regarding how to merge this: I suggest to take patch #1 via clk. When
this is merged I will take care for the pwm-xilinx driver (and others
that might benefit).
Best regards
Uwe
Uwe Kleine-König (2):
clk: Add a devm variant of clk_rate_exclusive_get()
pwm: xilinx: Simplify using devm functions
drivers/clk/clk.c | 15 +++++++++++++++
drivers/pwm/pwm-xilinx.c | 25 ++++++-------------------
include/linux/clk.h | 12 ++++++++++++
3 files changed, 33 insertions(+), 19 deletions(-)
base-commit: bbd220ce4e29ed55ab079007cff0b550895258eb
prerequisite-patch-id: 5a986d744a054000998ce06e3dbaaedede71c8ac
prerequisite-patch-id: cdb26f72d1fbd7fef4a9ef4476e0218dd3fcba22
prerequisite-patch-id: 838e3cb639cf13c7b571d77c1dea3d4ec479465d
prerequisite-patch-id: d5059c23f752a4861e5bbfe70b8ab771727bf68d
prerequisite-patch-id: c7ca9e00334dabe41f39e006ceb2b7d1afddcaa5
--
2.42.0
next reply other threads:[~2023-12-12 18:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 18:09 Uwe Kleine-König [this message]
2023-12-12 18:09 ` [PATCH 1/2] clk: Add a devm variant of clk_rate_exclusive_get() Uwe Kleine-König
2023-12-18 0:17 ` Stephen Boyd
2023-12-18 13:01 ` Uwe Kleine-König
2024-01-04 18:06 ` Uwe Kleine-König
2024-01-04 21:38 ` Stephen Boyd
2024-01-04 23:01 ` Uwe Kleine-König
2023-12-12 18:09 ` [PATCH 2/2] pwm: xilinx: Simplify using devm functions Uwe Kleine-König
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=cover.1702403904.git.u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michal.simek@amd.com \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--cc=sean.anderson@seco.com \
--cc=thierry.reding@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