All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/8] clk: Don't duplicate initialization on platform_dev
@ 2016-07-05 16:23 Ricardo Ribalda Delgado
  2016-07-05 16:23 ` [PATCH v5 1/8] clk: core: New macro CLK_OF_DECLARE_DRIVER Ricardo Ribalda Delgado
                   ` (10 more replies)
  0 siblings, 11 replies; 27+ messages in thread
From: Ricardo Ribalda Delgado @ 2016-07-05 16:23 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, s.hauer, linux-clk, linux-kernel
  Cc: Ricardo Ribalda Delgado

Clock providers can be probed as a normal platform device, or via
of_clk_init() before the rest of the platform devices are initialized
using the CLK_OF_DECLARE() macro.

If a driver required both initialization methodologies, the core would call
both probe/init functions.

This changeset prevent the dual initialization using the OF_POPULATE flag.

It also creates a new macro, CLK_OF_DECLARE_DRIVER, used by drivers that
require double initialization.

Finally, it adds module platform driver initialization to fixed-factor
and fixed-rate, enabling its use in dt overlays.

The order of the patches allows future bisects of the change. This explains
why  Avoid double initialization of clocks() is done almost at the end.

v5: Changes proposed by: Stephen Boyd <sboyd@codeaurora.org>
-Create CLK_OF_DECLARE_DRIVER() macro
-use it in clk-artpec6, sunxi,nxp

v4: Huge MACRO(), not posted to the list

v3: Use OF_POPULATE flag inside fixed-rate and fixed-factor

v2: Changes proposed by: Stephen Boyd <sboyd@codeaurora.org>
-Add error check
-CodeStyle on of_device_ide
-Use builtin_platform_driver()

When clock providers are added to the device tree after of_clk_init is called
they are not added to the clock provider list. This makes that drivers such
as i2c-xiic.c fail to init, as they may depend on the unadded clock provider.

Ricardo Ribalda Delgado (8):
  clk: core: New macro CLK_OF_DECLARE_DRIVER
  clk: axis: Use new macro CLK_OF_DECLARE_DRIVER
  clk: npx: Use new macro CLK_OF_DECLARE_DRIVER
  clk: sunxi: mod0: Use new macro CLK_OF_DECLARE_DRIVER
  clk: sunxi: apb0: Use new macro CLK_OF_DECLARE_DRIVER
  clk: core: Avoid double initialization of clocks
  clk: fixed-factor: Convert into a module platform driver
  clk: fixed-rate: Convert into a module platform driver

 drivers/clk/axis/clk-artpec6.c     |  4 +--
 drivers/clk/clk-fixed-factor.c     | 72 +++++++++++++++++++++++++++++++++++---
 drivers/clk/clk-fixed-rate.c       | 69 +++++++++++++++++++++++++++++++++---
 drivers/clk/clk.c                  |  4 +++
 drivers/clk/nxp/clk-lpc18xx-creg.c |  3 +-
 drivers/clk/sunxi/clk-mod0.c       |  3 +-
 drivers/clk/sunxi/clk-sun8i-apb0.c |  4 +--
 include/linux/clk-provider.h       | 12 +++++++
 8 files changed, 156 insertions(+), 15 deletions(-)

-- 
2.8.1

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

end of thread, other threads:[~2018-10-18 20:34 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-05 16:23 [PATCH v5 0/8] clk: Don't duplicate initialization on platform_dev Ricardo Ribalda Delgado
2016-07-05 16:23 ` [PATCH v5 1/8] clk: core: New macro CLK_OF_DECLARE_DRIVER Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 2/8] clk: axis: Use new " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 3/8] clk: npx: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 4/8] clk: sunxi: mod0: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 4/8] clk: sunxi: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 5/8] clk: sunxi: apb0: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 5/8] clk: sunxi: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 6/8] clk: core: Avoid double initialization of clocks Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 7/8] clk: fixed-factor: Convert into a module platform driver Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 8/8] clk: fixed-rate: " Ricardo Ribalda Delgado
2016-08-13  1:16   ` Stephen Boyd
2018-10-18 19:20   ` Alan Tull
2018-10-18 20:02     ` Ricardo Ribalda Delgado
2018-10-18 20:25       ` Stephen Boyd
2018-10-18 20:24     ` Stephen Boyd
2018-10-18 20:33       ` Alan Tull
2016-07-18 20:19 ` [PATCH v5 0/8] clk: Don't duplicate initialization on platform_dev Ricardo Ribalda Delgado

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.