mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] clk: implement a new managed helper and add first user
@ 2024-08-05  8:57 Bartosz Golaszewski
  2024-08-05  8:57 ` [PATCH v2 1/2] clk: provide devm_clk_get_optional_enabled_with_rate() Bartosz Golaszewski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2024-08-05  8:57 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Russell King, Marcel Holtmann,
	Luiz Augusto von Dentz
  Cc: linux-clk, linux-kernel, linux-bluetooth, Bartosz Golaszewski

I'm posting this as RFC to see if there's any interest. I noticed that
some drivers do: clk_get() -> clk_set_rate() -> clk_prepare_enable(). I
was wondering if it's worth factoring this out into dedicated helpers.

This series adds a new such helper for the "optional-enabled" use-case
and the first user. Let me know if this makes sense.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Changes in v2:
- s/EXPORT_SYMBOL/EXPORT_SYMBOL_GPL/
- add a stub for !COMMON_CLK
- Link to v1: https://lore.kernel.org/r/20240801-clk-new-helper-v1-0-81e9338b7b17@linaro.org

---
Bartosz Golaszewski (2):
      clk: provide devm_clk_get_optional_enabled_with_rate()
      Bluetooth: hci_qca: use devm_clk_get_optional_enabled_with_rate()

 drivers/bluetooth/hci_qca.c | 24 ++----------------------
 drivers/clk/clk-devres.c    | 28 ++++++++++++++++++++++++++++
 include/linux/clk.h         | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 63 insertions(+), 22 deletions(-)
---
base-commit: d6dbc9f56c3a70e915625b6f1887882c23dc5c91
change-id: 20240801-clk-new-helper-7853f662cda1

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


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

end of thread, other threads:[~2024-09-09  6:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-05  8:57 [PATCH v2 0/2] clk: implement a new managed helper and add first user Bartosz Golaszewski
2024-08-05  8:57 ` [PATCH v2 1/2] clk: provide devm_clk_get_optional_enabled_with_rate() Bartosz Golaszewski
2024-09-05 21:42   ` Stephen Boyd
2024-09-09  6:41     ` Bartosz Golaszewski
2024-08-05  8:57 ` [PATCH v2 2/2] Bluetooth: hci_qca: use devm_clk_get_optional_enabled_with_rate() Bartosz Golaszewski
2024-09-02  8:33 ` [PATCH v2 0/2] clk: implement a new managed helper and add first user Bartosz Golaszewski

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

all inboxes | Powered by JetHome®