linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/6] clk: Add functions to get optional clocks
@ 2018-11-16 14:59 Phil Edworthy
  2018-11-16 14:59 ` [PATCH v6 1/6] clk: Add of_clk_get_by_name_optional() function Phil Edworthy
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Phil Edworthy @ 2018-11-16 14:59 UTC (permalink / raw)
  To: Stephen Boyd, Michael Turquette, Andy Shevchenko, Russell King,
	Greg Ungerer, Geert Uytterhoeven, Ralf Baechle, Paul Burton,
	James Hogan, Jiaxun Yang, Huacai Chen, Guan Xuetao
  Cc: linux-clk, linux-kernel, linux-renesas-soc, Phil Edworthy,
	Uwe Kleine-König, linux-m68k, linux-mips, linux-arm-kernel

Quite a few drivers get an optional clock, e.g. a bus clock required to 
access peripheral's registers that is always enabled on some devices. This
series adds of_clk_get_by_name_optional(), clk_get_optional() and
devm_clk_get_optional() functions for this purpose.

The functions behave the same as of_clk_get_by_name(), clk_get() and
devm_clk_get() except that they will return NULL instead of -ENOENT. This
allows for simpler error handling in the callers.

*Note*
This changes the return values for of_clk_get_by_name() in some cases, see
[PATCH 1/6] clk: Add of_clk_get_by_name_optional() function.

v6:
 - Rework the __of_clk_get_by_name() logic so as to avoid duplicate tests.
 - Add doxygen style comment for devm_clk_get_optional() args
 - Add clk_get_optional() to archs that don't use the commom clk framework.

Phil Edworthy (6):
  clk: Add of_clk_get_by_name_optional() function
  clk: Add functions to get optional clocks
  m68k: coldfire: Add clk_get_optional() function
  MIPS: AR7: Add clk_get_optional() function
  MIPS: Loongson 2F: Add clk_get_optional() function
  arch/unicore32/kernel/clock.c: Add clk_get_optional() function

 arch/m68k/coldfire/clk.c               | 11 ++++
 arch/mips/ar7/clock.c                  | 11 ++++
 arch/mips/loongson64/lemote-2f/clock.c | 11 ++++
 arch/unicore32/kernel/clock.c          | 11 ++++
 drivers/clk/clk-devres.c               | 18 ++++-
 drivers/clk/clkdev.c                   | 91 ++++++++++++++++++++++----
 include/linux/clk.h                    | 38 +++++++++++
 7 files changed, 175 insertions(+), 16 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2018-12-03 12:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-16 14:59 [PATCH v6 0/6] clk: Add functions to get optional clocks Phil Edworthy
2018-11-16 14:59 ` [PATCH v6 1/6] clk: Add of_clk_get_by_name_optional() function Phil Edworthy
2018-11-16 16:01   ` Uwe Kleine-König
2018-11-16 16:11     ` Uwe Kleine-König
2018-11-19 10:41       ` Phil Edworthy
2018-11-19 10:46         ` Uwe Kleine-König
2018-11-19 12:53           ` Phil Edworthy
2018-11-19 12:58             ` Uwe Kleine-König
2018-11-19 13:41               ` Phil Edworthy
2018-11-16 14:59 ` [PATCH v6 2/6] clk: Add (devm_)clk_get_optional() functions Phil Edworthy
2018-11-16 14:59 ` [PATCH v6 3/6] m68k: coldfire: Add clk_get_optional() function Phil Edworthy
2018-11-29 11:54   ` Greg Ungerer
2018-11-29 12:02     ` Phil Edworthy
2018-11-29 12:10       ` Greg Ungerer
2018-11-29 16:32     ` Christoph Hellwig
2018-12-03 12:29       ` Greg Ungerer
2018-11-16 14:59 ` [PATCH v6 4/6] MIPS: AR7: " Phil Edworthy
2018-11-16 14:59 ` [PATCH v6 5/6] MIPS: Loongson 2F: " Phil Edworthy
2018-11-16 14:59 ` [PATCH v6 6/6] arch/unicore32/kernel/clock.c: " Phil Edworthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).