Linux clock framework development
 help / color / mirror / Atom feed
* [PATCH 0/2] clk: Add a devm variant of clk_rate_exclusive_get()
@ 2023-12-12 18:09 Uwe Kleine-König
  2023-12-12 18:09 ` [PATCH 1/2] " Uwe Kleine-König
  2023-12-12 18:09 ` [PATCH 2/2] pwm: xilinx: Simplify using devm functions Uwe Kleine-König
  0 siblings, 2 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2023-12-12 18:09 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Russell King
  Cc: linux-clk, kernel, Sean Anderson, Thierry Reding, Michal Simek,
	linux-arm-kernel, linux-pwm

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-01-04 23:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-12 18:09 [PATCH 0/2] clk: Add a devm variant of clk_rate_exclusive_get() Uwe Kleine-König
2023-12-12 18:09 ` [PATCH 1/2] " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox