* [PATCH 1/6] clk: Remove unused clk.dev
2026-11-19 13:40 [PATCH 0/6] clk: Improve consumer field in debugfs clk_summary Geert Uytterhoeven
@ 2026-11-19 13:40 ` Geert Uytterhoeven
2026-11-20 1:40 ` Brian Masney
2026-11-19 13:40 ` [PATCH 2/6] clk: Add dev_clk_get_from_provider() Geert Uytterhoeven
` (4 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Geert Uytterhoeven @ 2026-11-19 13:40 UTC (permalink / raw)
To: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson
Cc: linux-clk, linux-renesas-soc, linux-rockchip, linux-omap,
linux-arm-kernel, dri-devel, linux-pm, Geert Uytterhoeven
This basically reverts commit efa850487a6b6742 ("clk: Inform the core
about consumer devices").
This commit added a struct device pointer member to struct clk and a
parameter to clk_hw_create_clk(), but the new member was never used
beyond setting.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/clk/clk.c | 14 +++++---------
drivers/clk/clk.h | 11 ++++-------
drivers/clk/clkdev.c | 14 ++++----------
3 files changed, 13 insertions(+), 26 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 673eac47450b1e1c..858f4d60ed2d97c4 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -160,7 +160,6 @@ struct clk_core {
struct clk {
struct clk_core *core;
- struct device *dev;
const char *dev_id;
const char *con_id;
unsigned long min_rate;
@@ -4249,7 +4248,6 @@ static void free_clk(struct clk *clk)
/**
* clk_hw_create_clk: Allocate and link a clk consumer to a clk_core given
* a clk_hw
- * @dev: clk consumer device
* @hw: clk_hw associated with the clk being consumed
* @dev_id: string describing device name
* @con_id: connection ID string on device
@@ -4259,9 +4257,8 @@ static void free_clk(struct clk *clk)
* consumers. It connects a consumer to the clk_core and clk_hw structures
* used by the framework and clk provider respectively.
*/
-struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
- const char *dev_id, const char *con_id,
- struct module *owner)
+struct clk *clk_hw_create_clk(struct clk_hw *hw, const char *dev_id,
+ const char *con_id, struct module *owner)
{
struct clk *clk;
struct clk_core *core;
@@ -4274,7 +4271,6 @@ struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
clk = alloc_clk(core, dev_id, con_id);
if (IS_ERR(clk))
return clk;
- clk->dev = dev;
/*
* Pin the provider module only when the consumer lives in a different
@@ -4303,7 +4299,7 @@ struct clk *__clk_hw_get_clk(struct clk_hw *hw, const char *con_id,
struct device *dev = hw->core->dev;
const char *name = dev ? dev_name(dev) : NULL;
- return clk_hw_create_clk(dev, hw, name, con_id, owner);
+ return clk_hw_create_clk(hw, name, con_id, owner);
}
EXPORT_SYMBOL(__clk_hw_get_clk);
@@ -5392,7 +5388,7 @@ struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec)
{
struct clk_hw *hw = of_clk_get_hw_from_clkspec(clkspec);
- return clk_hw_create_clk(NULL, hw, NULL, __func__, NULL);
+ return clk_hw_create_clk(hw, NULL, __func__, NULL);
}
EXPORT_SYMBOL_GPL(of_clk_get_from_provider);
@@ -5420,7 +5416,7 @@ static struct clk *__of_clk_get(struct device_node *np,
{
struct clk_hw *hw = of_clk_get_hw(np, index, con_id);
- return clk_hw_create_clk(NULL, hw, dev_id, con_id, NULL);
+ return clk_hw_create_clk(hw, dev_id, con_id, NULL);
}
struct clk *of_clk_get(struct device_node *np, int index)
diff --git a/drivers/clk/clk.h b/drivers/clk/clk.h
index 5009380863a9dc6f..ba23700149de0445 100644
--- a/drivers/clk/clk.h
+++ b/drivers/clk/clk.h
@@ -5,8 +5,6 @@
*/
struct clk_hw;
-struct device;
-struct of_phandle_args;
#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
struct clk_hw *of_clk_get_hw(struct device_node *np,
@@ -22,15 +20,14 @@ static inline struct clk_hw *of_clk_get_hw(struct device_node *np,
struct clk_hw *clk_find_hw(const char *dev_id, const char *con_id);
#ifdef CONFIG_COMMON_CLK
-struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
- const char *dev_id, const char *con_id,
- struct module *owner);
+struct clk *clk_hw_create_clk(struct clk_hw *hw, const char *dev_id,
+ const char *con_id, struct module *owner);
void __clk_put(struct clk *clk);
#else
/* All these casts to avoid ifdefs in clkdev... */
static inline struct clk *
-clk_hw_create_clk(struct device *dev, struct clk_hw *hw, const char *dev_id,
- const char *con_id, struct module *owner)
+clk_hw_create_clk(struct clk_hw *hw, const char *dev_id, const char *con_id,
+ struct module *owner)
{
return (struct clk *)hw;
}
diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 919fc680ae4dd6ec..e963f878290564da 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -83,17 +83,11 @@ struct clk_hw *clk_find_hw(const char *dev_id, const char *con_id)
return hw;
}
-static struct clk *__clk_get_sys(struct device *dev, const char *dev_id,
- const char *con_id)
+struct clk *clk_get_sys(const char *dev_id, const char *con_id)
{
struct clk_hw *hw = clk_find_hw(dev_id, con_id);
- return clk_hw_create_clk(dev, hw, dev_id, con_id, NULL);
-}
-
-struct clk *clk_get_sys(const char *dev_id, const char *con_id)
-{
- return __clk_get_sys(NULL, dev_id, con_id);
+ return clk_hw_create_clk(hw, dev_id, con_id, NULL);
}
EXPORT_SYMBOL(clk_get_sys);
@@ -105,10 +99,10 @@ struct clk *clk_get(struct device *dev, const char *con_id)
if (dev && dev->of_node) {
hw = of_clk_get_hw(dev->of_node, 0, con_id);
if (!IS_ERR(hw) || PTR_ERR(hw) == -EPROBE_DEFER)
- return clk_hw_create_clk(dev, hw, dev_id, con_id, NULL);
+ return clk_hw_create_clk(hw, dev_id, con_id, NULL);
}
- return __clk_get_sys(dev, dev_id, con_id);
+ return clk_get_sys(dev_id, con_id);
}
EXPORT_SYMBOL(clk_get);
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH 1/6] clk: Remove unused clk.dev
2026-11-19 13:40 ` [PATCH 1/6] clk: Remove unused clk.dev Geert Uytterhoeven
@ 2026-11-20 1:40 ` Brian Masney
2026-11-20 7:44 ` Geert Uytterhoeven
0 siblings, 1 reply; 19+ messages in thread
From: Brian Masney @ 2026-11-20 1:40 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson, linux-clk, linux-renesas-soc,
linux-rockchip, linux-omap, linux-arm-kernel, dri-devel, linux-pm,
Brian Masney
> This basically reverts commit efa850487a6b6742 ("clk: Inform the core
> about consumer devices").
>
> This commit added a struct device pointer member to struct clk and a
> parameter to clk_hw_create_clk(), but the new member was never used
> beyond setting.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/clk/clk.c | 14 +++++---------
> drivers/clk/clk.h | 11 ++++-------
> drivers/clk/clkdev.c | 14 ++++----------
> 3 files changed, 13 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 673eac47450b..858f4d60ed2d 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -160,7 +160,6 @@ struct clk_core {
>
> struct clk {
> struct clk_core *core;
> - struct device *dev;
> const char *dev_id;
> const char *con_id;
> unsigned long min_rate;
> @@ -4249,7 +4248,6 @@ static void free_clk(struct clk *clk)
> /**
> * clk_hw_create_clk: Allocate and link a clk consumer to a clk_core given
> * a clk_hw
> - * @dev: clk consumer device
> * @hw: clk_hw associated with the clk being consumed
> * @dev_id: string describing device name
> * @con_id: connection ID string on device
> @@ -4259,9 +4257,8 @@ static void free_clk(struct clk *clk)
> * consumers. It connects a consumer to the clk_core and clk_hw structures
> * used by the framework and clk provider respectively.
> */
> -struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
> - const char *dev_id, const char *con_id,
> - struct module *owner)
> +struct clk *clk_hw_create_clk(struct clk_hw *hw, const char *dev_id,
> + const char *con_id, struct module *owner)
> {
> struct clk *clk;
> struct clk_core *core;
> @@ -4274,7 +4271,6 @@ struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
> clk = alloc_clk(core, dev_id, con_id);
> if (IS_ERR(clk))
> return clk;
> - clk->dev = dev;
>
> /*
> * Pin the provider module only when the consumer lives in a different
> @@ -4303,7 +4299,7 @@ struct clk *__clk_hw_get_clk(struct clk_hw *hw, const char *con_id,
> struct device *dev = hw->core->dev;
> const char *name = dev ? dev_name(dev) : NULL;
>
> - return clk_hw_create_clk(dev, hw, name, con_id, owner);
> + return clk_hw_create_clk(hw, name, con_id, owner);
> }
> EXPORT_SYMBOL(__clk_hw_get_clk);
>
> @@ -5392,7 +5388,7 @@ struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec)
> {
> struct clk_hw *hw = of_clk_get_hw_from_clkspec(clkspec);
>
> - return clk_hw_create_clk(NULL, hw, NULL, __func__, NULL);
> + return clk_hw_create_clk(hw, NULL, __func__, NULL);
> }
> EXPORT_SYMBOL_GPL(of_clk_get_from_provider);
>
> @@ -5420,7 +5416,7 @@ static struct clk *__of_clk_get(struct device_node *np,
> {
> struct clk_hw *hw = of_clk_get_hw(np, index, con_id);
>
> - return clk_hw_create_clk(NULL, hw, dev_id, con_id, NULL);
> + return clk_hw_create_clk(hw, dev_id, con_id, NULL);
> }
>
> struct clk *of_clk_get(struct device_node *np, int index)
> diff --git a/drivers/clk/clk.h b/drivers/clk/clk.h
> index 5009380863a9..ba23700149de 100644
> --- a/drivers/clk/clk.h
> +++ b/drivers/clk/clk.h
> @@ -5,8 +5,6 @@
> */
>
> struct clk_hw;
> -struct device;
> -struct of_phandle_args;
Did you mean to remove of_phandle_args?
Otherwise this looks good to me.
Brian
--
Brian Masney <masneyb@kernel.org>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH 1/6] clk: Remove unused clk.dev
2026-11-20 1:40 ` Brian Masney
@ 2026-11-20 7:44 ` Geert Uytterhoeven
2026-11-20 16:56 ` Brian Masney
0 siblings, 1 reply; 19+ messages in thread
From: Geert Uytterhoeven @ 2026-11-20 7:44 UTC (permalink / raw)
To: Brian Masney
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson, linux-clk, linux-renesas-soc,
linux-rockchip, linux-omap, linux-arm-kernel, dri-devel, linux-pm
Hi Brian,
On Fri, 20 Nov 2026 at 02:40, Brian Masney <masneyb@kernel.org> wrote:
> > This basically reverts commit efa850487a6b6742 ("clk: Inform the core
> > about consumer devices").
> >
> > This commit added a struct device pointer member to struct clk and a
> > parameter to clk_hw_create_clk(), but the new member was never used
> > beyond setting.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > --- a/drivers/clk/clk.h
> > +++ b/drivers/clk/clk.h
> > @@ -5,8 +5,6 @@
> > */
> >
> > struct clk_hw;
> > -struct device;
> > -struct of_phandle_args;
>
> Did you mean to remove of_phandle_args?
Yes, it was added by efa850487a6b6742, too (although it was
used in that header file before). Currently it's not used.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH 1/6] clk: Remove unused clk.dev
2026-11-20 7:44 ` Geert Uytterhoeven
@ 2026-11-20 16:56 ` Brian Masney
0 siblings, 0 replies; 19+ messages in thread
From: Brian Masney @ 2026-11-20 16:56 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson, linux-clk, linux-renesas-soc,
linux-rockchip, linux-omap, linux-arm-kernel, dri-devel, linux-pm
On Fri, Nov 20, 2026 at 08:44:29AM +0100, Geert Uytterhoeven wrote:
> On Fri, 20 Nov 2026 at 02:40, Brian Masney <masneyb@kernel.org> wrote:
> > > This basically reverts commit efa850487a6b6742 ("clk: Inform the core
> > > about consumer devices").
> > >
> > > This commit added a struct device pointer member to struct clk and a
> > > parameter to clk_hw_create_clk(), but the new member was never used
> > > beyond setting.
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> > > --- a/drivers/clk/clk.h
> > > +++ b/drivers/clk/clk.h
> > > @@ -5,8 +5,6 @@
> > > */
> > >
> > > struct clk_hw;
> > > -struct device;
> > > -struct of_phandle_args;
> >
> > Did you mean to remove of_phandle_args?
>
> Yes, it was added by efa850487a6b6742, too (although it was
> used in that header file before). Currently it's not used.
OK, I see that.
Reviewed-by: Brian Masney <masneyb@kernel.org>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 2/6] clk: Add dev_clk_get_from_provider()
2026-11-19 13:40 [PATCH 0/6] clk: Improve consumer field in debugfs clk_summary Geert Uytterhoeven
2026-11-19 13:40 ` [PATCH 1/6] clk: Remove unused clk.dev Geert Uytterhoeven
@ 2026-11-19 13:40 ` Geert Uytterhoeven
2026-11-20 1:40 ` Brian Masney
2026-11-19 13:40 ` [PATCH 3/6] clk: renesas: Convert to dev_clk_get_from_provider() Geert Uytterhoeven
` (3 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Geert Uytterhoeven @ 2026-11-19 13:40 UTC (permalink / raw)
To: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson
Cc: linux-clk, linux-renesas-soc, linux-rockchip, linux-omap,
linux-arm-kernel, dri-devel, linux-pm, Geert Uytterhoeven
Clocks obtained through of_clk_get_from_provider() show up as
"deviceless" in the consumer column of the clk_summary file in debugfs.
Add a new variant dev_clk_get_from_provider() that also takes a consumer
device, so callers can provide it, and consumer's name will be shown in
the clk_summary output.
Reimplement of_clk_get_from_provider() on top of
dev_clk_get_from_provider().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/clk/clk.c | 11 +++++++----
include/linux/clk.h | 10 ++++++++--
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 858f4d60ed2d97c4..195c7d80e4f2b579 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -5377,20 +5377,23 @@ of_clk_get_hw_from_clkspec(struct of_phandle_args *clkspec)
}
/**
- * of_clk_get_from_provider() - Lookup a clock from a clock provider
+ * dev_clk_get_from_provider() - Lookup a clock from a clock provider
+ * @dev: clk consumer device
* @clkspec: pointer to a clock specifier data structure
*
* This function looks up a struct clk from the registered list of clock
* providers, an input is a clock specifier data structure as returned
* from the OF phandle parser.
*/
-struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec)
+struct clk *dev_clk_get_from_provider(struct device *dev,
+ struct of_phandle_args *clkspec)
{
struct clk_hw *hw = of_clk_get_hw_from_clkspec(clkspec);
+ const char *name = dev ? dev_name(dev) : NULL;
- return clk_hw_create_clk(hw, NULL, __func__, NULL);
+ return clk_hw_create_clk(hw, name, __func__, NULL);
}
-EXPORT_SYMBOL_GPL(of_clk_get_from_provider);
+EXPORT_SYMBOL_GPL(dev_clk_get_from_provider);
struct clk_hw *of_clk_get_hw(struct device_node *np, int index,
const char *con_id)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index db9cf184fd999b85..45c6eb09436036bb 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -1261,7 +1261,8 @@ static inline struct clk *clk_get_optional(struct device *dev, const char *id)
#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
struct clk *of_clk_get(struct device_node *np, int index);
struct clk *of_clk_get_by_name(struct device_node *np, const char *name);
-struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec);
+struct clk *dev_clk_get_from_provider(struct device *dev,
+ struct of_phandle_args *clkspec);
#else
static inline struct clk *of_clk_get(struct device_node *np, int index)
{
@@ -1272,10 +1273,15 @@ static inline struct clk *of_clk_get_by_name(struct device_node *np,
{
return ERR_PTR(-ENOENT);
}
-static inline struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec)
+static inline struct clk *dev_clk_get_from_provider(struct device *dev,
+ struct of_phandle_args *clkspec)
{
return ERR_PTR(-ENOENT);
}
#endif
+static inline struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec)
+{
+ return dev_clk_get_from_provider(NULL, clkspec);
+}
#endif
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH 2/6] clk: Add dev_clk_get_from_provider()
2026-11-19 13:40 ` [PATCH 2/6] clk: Add dev_clk_get_from_provider() Geert Uytterhoeven
@ 2026-11-20 1:40 ` Brian Masney
0 siblings, 0 replies; 19+ messages in thread
From: Brian Masney @ 2026-11-20 1:40 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson, linux-clk, linux-renesas-soc,
linux-rockchip, linux-omap, linux-arm-kernel, dri-devel, linux-pm,
Brian Masney
> Clocks obtained through of_clk_get_from_provider() show up as
> "deviceless" in the consumer column of the clk_summary file in debugfs.
> Add a new variant dev_clk_get_from_provider() that also takes a consumer
> device, so callers can provide it, and consumer's name will be shown in
> the clk_summary output.
>
> Reimplement of_clk_get_from_provider() on top of
> dev_clk_get_from_provider().
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <masneyb@kernel.org>
--
Brian Masney <masneyb@kernel.org>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 3/6] clk: renesas: Convert to dev_clk_get_from_provider()
2026-11-19 13:40 [PATCH 0/6] clk: Improve consumer field in debugfs clk_summary Geert Uytterhoeven
2026-11-19 13:40 ` [PATCH 1/6] clk: Remove unused clk.dev Geert Uytterhoeven
2026-11-19 13:40 ` [PATCH 2/6] clk: Add dev_clk_get_from_provider() Geert Uytterhoeven
@ 2026-11-19 13:40 ` Geert Uytterhoeven
2026-11-20 1:40 ` Brian Masney
2026-11-19 13:40 ` [PATCH 4/6] [RFT] drm/rockchip: dw_hdmi: " Geert Uytterhoeven
` (2 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Geert Uytterhoeven @ 2026-11-19 13:40 UTC (permalink / raw)
To: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson
Cc: linux-clk, linux-renesas-soc, linux-rockchip, linux-omap,
linux-arm-kernel, dri-devel, linux-pm, Geert Uytterhoeven
Renesas clock domain callbacks use of_clk_get_from_provider() to obtain
clocks used for power management, so the latter show up as "deviceless"
in the consumer column of the clk_summary file in debugfs.
Fix this by using dev_clk_get_from_provider() instead, letting us pass
the consumer device, too.
Sample clk_summary change snippet on R-Car H1 Marzen:
- sata 1 1 0 62500000 0 0 50000 Y deviceless of_clk_get_from_provider
+ sata 1 1 0 62500000 0 0 50000 Y fc600000.sata dev_clk_get_from_provider
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Tested on R-Car H1 and H3.
---
drivers/clk/renesas/clk-mstp.c | 2 +-
drivers/clk/renesas/r9a06g032-clocks.c | 2 +-
drivers/clk/renesas/renesas-cpg-mssr.c | 2 +-
drivers/clk/renesas/rzg2l-cpg.c | 2 +-
drivers/clk/renesas/rzv2h-cpg.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/renesas/clk-mstp.c b/drivers/clk/renesas/clk-mstp.c
index 1bd2acb7e175f9c7..79d3a0b9cf7bb08a 100644
--- a/drivers/clk/renesas/clk-mstp.c
+++ b/drivers/clk/renesas/clk-mstp.c
@@ -276,7 +276,7 @@ int cpg_mstp_attach_dev(struct generic_pm_domain *unused, struct device *dev)
return 0;
found:
- clk = of_clk_get_from_provider(&clkspec);
+ clk = dev_clk_get_from_provider(dev, &clkspec);
of_node_put(clkspec.np);
if (IS_ERR(clk))
diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c
index 871a915c24b8b609..9ae716dc6ede3438 100644
--- a/drivers/clk/renesas/r9a06g032-clocks.c
+++ b/drivers/clk/renesas/r9a06g032-clocks.c
@@ -748,7 +748,7 @@ static int create_add_module_clock(struct of_phandle_args *clkspec,
struct clk *clk;
int error;
- clk = of_clk_get_from_provider(clkspec);
+ clk = dev_clk_get_from_provider(dev, clkspec);
if (IS_ERR(clk))
return PTR_ERR(clk);
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index 1ed11ce4a04c8b44..1fc12132acfe4a8b 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -641,7 +641,7 @@ int cpg_mssr_attach_dev(struct generic_pm_domain *unused, struct device *dev)
return 0;
found:
- clk = of_clk_get_from_provider(&clkspec);
+ clk = dev_clk_get_from_provider(dev, &clkspec);
of_node_put(clkspec.np);
if (IS_ERR(clk))
diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c
index 06ae7228a95480fd..fb57d26947e1647c 100644
--- a/drivers/clk/renesas/rzg2l-cpg.c
+++ b/drivers/clk/renesas/rzg2l-cpg.c
@@ -2557,7 +2557,7 @@ static int rzg2l_cpg_attach_dev(struct generic_pm_domain *domain, struct device
goto err;
}
}
- clk = of_clk_get_from_provider(&clkspec);
+ clk = dev_clk_get_from_provider(dev, &clkspec);
of_node_put(clkspec.np);
if (IS_ERR(clk)) {
error = PTR_ERR(clk);
diff --git a/drivers/clk/renesas/rzv2h-cpg.c b/drivers/clk/renesas/rzv2h-cpg.c
index fabeaef8e62fba33..4b685f7250f661bd 100644
--- a/drivers/clk/renesas/rzv2h-cpg.c
+++ b/drivers/clk/renesas/rzv2h-cpg.c
@@ -1483,7 +1483,7 @@ static int rzv2h_cpg_attach_dev(struct generic_pm_domain *domain, struct device
goto err;
}
}
- clk = of_clk_get_from_provider(&clkspec);
+ clk = dev_clk_get_from_provider(dev, &clkspec);
of_node_put(clkspec.np);
if (IS_ERR(clk)) {
error = PTR_ERR(clk);
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH 3/6] clk: renesas: Convert to dev_clk_get_from_provider()
2026-11-19 13:40 ` [PATCH 3/6] clk: renesas: Convert to dev_clk_get_from_provider() Geert Uytterhoeven
@ 2026-11-20 1:40 ` Brian Masney
0 siblings, 0 replies; 19+ messages in thread
From: Brian Masney @ 2026-11-20 1:40 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson, linux-clk, linux-renesas-soc,
linux-rockchip, linux-omap, linux-arm-kernel, dri-devel, linux-pm,
Brian Masney
> Renesas clock domain callbacks use of_clk_get_from_provider() to obtain
> clocks used for power management, so the latter show up as "deviceless"
> in the consumer column of the clk_summary file in debugfs.
>
> Fix this by using dev_clk_get_from_provider() instead, letting us pass
> the consumer device, too.
>
> Sample clk_summary change snippet on R-Car H1 Marzen:
> - sata 1 1 0 62500000 0 0 50000 Y deviceless of_clk_get_from_provider
> + sata 1 1 0 62500000 0 0 50000 Y fc600000.sata dev_clk_get_from_provider
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <masneyb@kernel.org>
--
Brian Masney <masneyb@kernel.org>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 4/6] [RFT] drm/rockchip: dw_hdmi: Convert to dev_clk_get_from_provider()
2026-11-19 13:40 [PATCH 0/6] clk: Improve consumer field in debugfs clk_summary Geert Uytterhoeven
` (2 preceding siblings ...)
2026-11-19 13:40 ` [PATCH 3/6] clk: renesas: Convert to dev_clk_get_from_provider() Geert Uytterhoeven
@ 2026-11-19 13:40 ` Geert Uytterhoeven
2026-11-20 1:40 ` Brian Masney
2026-11-19 13:40 ` [PATCH 5/6] [RFT] ARM: OMAP2+: " Geert Uytterhoeven
2026-11-19 13:40 ` [PATCH 6/6] [RFC] pmdomain: renesas: r8a78000: " Geert Uytterhoeven
5 siblings, 1 reply; 19+ messages in thread
From: Geert Uytterhoeven @ 2026-11-19 13:40 UTC (permalink / raw)
To: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson
Cc: linux-clk, linux-renesas-soc, linux-rockchip, linux-omap,
linux-arm-kernel, dri-devel, linux-pm, Geert Uytterhoeven
The Rockchip Designware HDMI driver uses of_clk_get_from_provider() to
obtain the clock for the HDMI PHY, so the latter shows up as
"deviceless" in the consumer column of the clk_summary file in debugfs.
Fix this by using dev_clk_get_from_provider() instead, letting us pass
the consumer device, too.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
index b6e154c35e7c290e..a44e4b273924430e 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
@@ -633,7 +633,8 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
if (!of_parse_phandle_with_args(np, "phys", "#phy-cells", index,
&clkspec)) {
- hdmi->hdmiphy_clk = of_clk_get_from_provider(&clkspec);
+ hdmi->hdmiphy_clk = dev_clk_get_from_provider(dev,
+ &clkspec);
of_node_put(clkspec.np);
if (IS_ERR(hdmi->hdmiphy_clk))
hdmi->hdmiphy_clk = NULL;
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH 4/6] [RFT] drm/rockchip: dw_hdmi: Convert to dev_clk_get_from_provider()
2026-11-19 13:40 ` [PATCH 4/6] [RFT] drm/rockchip: dw_hdmi: " Geert Uytterhoeven
@ 2026-11-20 1:40 ` Brian Masney
0 siblings, 0 replies; 19+ messages in thread
From: Brian Masney @ 2026-11-20 1:40 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson, linux-clk, linux-renesas-soc,
linux-rockchip, linux-omap, linux-arm-kernel, dri-devel, linux-pm,
Brian Masney
> The Rockchip Designware HDMI driver uses of_clk_get_from_provider() to
> obtain the clock for the HDMI PHY, so the latter shows up as
> "deviceless" in the consumer column of the clk_summary file in debugfs.
>
> Fix this by using dev_clk_get_from_provider() instead, letting us pass
> the consumer device, too.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <masneyb@kernel.org>
--
Brian Masney <masneyb@kernel.org>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 5/6] [RFT] ARM: OMAP2+: Convert to dev_clk_get_from_provider()
2026-11-19 13:40 [PATCH 0/6] clk: Improve consumer field in debugfs clk_summary Geert Uytterhoeven
` (3 preceding siblings ...)
2026-11-19 13:40 ` [PATCH 4/6] [RFT] drm/rockchip: dw_hdmi: " Geert Uytterhoeven
@ 2026-11-19 13:40 ` Geert Uytterhoeven
2026-11-19 21:50 ` Andreas Kemnade
2026-11-20 1:40 ` Brian Masney
2026-11-19 13:40 ` [PATCH 6/6] [RFC] pmdomain: renesas: r8a78000: " Geert Uytterhoeven
5 siblings, 2 replies; 19+ messages in thread
From: Geert Uytterhoeven @ 2026-11-19 13:40 UTC (permalink / raw)
To: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson
Cc: linux-clk, linux-renesas-soc, linux-rockchip, linux-omap,
linux-arm-kernel, dri-devel, linux-pm, Geert Uytterhoeven
OMAP2+ clock handling uses of_clk_get_from_provider() to obtain clocks
used for power management, so the latter show up as "deviceless" in the
consumer column of the clk_summary file in debugfs.
Fix this by using dev_clk_get_from_provider() instead, letting us pass
the consumer device, too.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
The first change is probably OK. The second change may fail if anything
in the oh->od->pdev->dev chain is not available yet at this point.
---
arch/arm/mach-omap2/omap_device.c | 2 +-
arch/arm/mach-omap2/omap_hwmod.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 77a75b0b9ae69c85..5695e0c8f2392eca 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -73,7 +73,7 @@ static void _add_clkdev(struct omap_device *od, const char *clk_alias,
clkspec.np = of_find_node_by_name(NULL, clk_name);
- r = of_clk_get_from_provider(&clkspec);
+ r = dev_clk_get_from_provider(&od->pdev->dev, &clkspec);
rc = clk_register_clkdev(r, clk_alias,
dev_name(&od->pdev->dev));
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 03cd523dff874bb0..5e4123014909d4ac 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -147,6 +147,7 @@
#include <asm/system_misc.h>
#include "clock.h"
+#include "omap_device.h"
#include "omap_hwmod.h"
#include "soc.h"
@@ -796,7 +797,7 @@ static struct clk *_lookup_clkctrl_clk(struct omap_hwmod *oh)
clkspec.args[0] = addr - provider->addr[0];
clkspec.args[1] = 0;
- clk = of_clk_get_from_provider(&clkspec);
+ clk = dev_clk_get_from_provider(&oh->od->pdev->dev, &clkspec);
pr_debug("%s: %s got %p (offset=%x, provider=%pOF)\n",
__func__, oh->name, clk,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH 5/6] [RFT] ARM: OMAP2+: Convert to dev_clk_get_from_provider()
2026-11-19 13:40 ` [PATCH 5/6] [RFT] ARM: OMAP2+: " Geert Uytterhoeven
@ 2026-11-19 21:50 ` Andreas Kemnade
2026-11-20 7:49 ` Geert Uytterhoeven
2026-11-20 1:40 ` Brian Masney
1 sibling, 1 reply; 19+ messages in thread
From: Andreas Kemnade @ 2026-11-19 21:50 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Aaro Koskinen, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Paul Walmsley, Stephen Boyd, Brian Masney,
Jerome Brunet, Sandy Huang, Heiko Stübner, Andy Yan,
Ulf Hansson, linux-clk, linux-renesas-soc, linux-rockchip,
linux-omap, linux-arm-kernel, dri-devel, linux-pm
On Thu, 19 Nov 2026 14:40:38 +0100
Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> OMAP2+ clock handling uses of_clk_get_from_provider() to obtain clocks
> used for power management, so the latter show up as "deviceless" in the
> consumer column of the clk_summary file in debugfs.
>
> Fix this by using dev_clk_get_from_provider() instead, letting us pass
> the consumer device, too.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Compile-tested only.
>
> The first change is probably OK. The second change may fail if anything
> in the oh->od->pdev->dev chain is not available yet at this point.
Test on OMAP3:
$ diff -u clk-old clk-new
--- clk-old 2026-11-19 22:44:59.810807920 +0100
+++ clk-new 2026-11-19 22:26:52.862531880 +0100
@@ -1,17 +1,17 @@
enable prepare protect duty hardware connection
clock count count count rate accuracy phase cycle enable consumer id
---------------------------------------------------------------------------------------------------------------------------------------------
- oscillator 0 0 0 26000000 0 0 50000 Y deviceless of_clk_get_from_provider
+ oscillator 0 0 0 26000000 0 0 50000 Y deviceless dev_clk_get_from_provider
deviceless no_connection_id
- secure_32k_fck 0 1 0 32768 0 0 50000 Y deviceless of_clk_get_from_provider
+ secure_32k_fck 0 1 0 32768 0 0 50000 Y deviceless dev_clk_get_from_provider
deviceless no_connection_id
- wdt1_fck 0 0 0 32768 0 0 50000 Y deviceless of_clk_get_from_provider
+ wdt1_fck 0 0 0 32768 0 0 50000 Y deviceless dev_clk_get_from_provider
deviceless no_connection_id
gpt12_fck 0 1 0 32768 0 0 50000 Y 48304000.timer fck
48304000.target-module fck
- deviceless of_clk_get_from_provider
+ deviceless dev_clk_get_from_provider
deviceless no_connection_id
- dummy_ck 0 0 0 0 0 0 50000 Y deviceless of_clk_get_from_provider
+ dummy_ck 0 0 0 0 0 0 50000 Y deviceless dev_clk_get_from_provider
deviceless no_connection_id
mcbsp_clks 0 5 0 0 0 0 50000 Y deviceless mcbsp_clks
deviceless mcbsp_clks
[...]
Regards,
Andreas
> ---
> arch/arm/mach-omap2/omap_device.c | 2 +-
> arch/arm/mach-omap2/omap_hwmod.c | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
> index 77a75b0b9ae69c85..5695e0c8f2392eca 100644
> --- a/arch/arm/mach-omap2/omap_device.c
> +++ b/arch/arm/mach-omap2/omap_device.c
> @@ -73,7 +73,7 @@ static void _add_clkdev(struct omap_device *od, const char *clk_alias,
>
> clkspec.np = of_find_node_by_name(NULL, clk_name);
>
> - r = of_clk_get_from_provider(&clkspec);
> + r = dev_clk_get_from_provider(&od->pdev->dev, &clkspec);
>
> rc = clk_register_clkdev(r, clk_alias,
> dev_name(&od->pdev->dev));
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 03cd523dff874bb0..5e4123014909d4ac 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -147,6 +147,7 @@
> #include <asm/system_misc.h>
>
> #include "clock.h"
> +#include "omap_device.h"
> #include "omap_hwmod.h"
>
> #include "soc.h"
> @@ -796,7 +797,7 @@ static struct clk *_lookup_clkctrl_clk(struct omap_hwmod *oh)
> clkspec.args[0] = addr - provider->addr[0];
> clkspec.args[1] = 0;
>
> - clk = of_clk_get_from_provider(&clkspec);
> + clk = dev_clk_get_from_provider(&oh->od->pdev->dev, &clkspec);
>
> pr_debug("%s: %s got %p (offset=%x, provider=%pOF)\n",
> __func__, oh->name, clk,
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH 5/6] [RFT] ARM: OMAP2+: Convert to dev_clk_get_from_provider()
2026-11-19 21:50 ` Andreas Kemnade
@ 2026-11-20 7:49 ` Geert Uytterhoeven
2026-11-20 8:43 ` Andreas Kemnade
0 siblings, 1 reply; 19+ messages in thread
From: Geert Uytterhoeven @ 2026-11-20 7:49 UTC (permalink / raw)
To: Andreas Kemnade
Cc: Aaro Koskinen, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Paul Walmsley, Stephen Boyd, Brian Masney,
Jerome Brunet, Sandy Huang, Heiko Stübner, Andy Yan,
Ulf Hansson, linux-clk, linux-renesas-soc, linux-rockchip,
linux-omap, linux-arm-kernel, dri-devel, linux-pm
Hi Andreas,
On Thu, 19 Nov 2026 at 22:50, Andreas Kemnade <andreas@kemnade.info> wrote:
> On Thu, 19 Nov 2026 14:40:38 +0100
> Geert Uytterhoeven <geert+renesas@glider.be> wrote:
>
> > OMAP2+ clock handling uses of_clk_get_from_provider() to obtain clocks
> > used for power management, so the latter show up as "deviceless" in the
> > consumer column of the clk_summary file in debugfs.
> >
> > Fix this by using dev_clk_get_from_provider() instead, letting us pass
> > the consumer device, too.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > Compile-tested only.
> >
> > The first change is probably OK. The second change may fail if anything
> > in the oh->od->pdev->dev chain is not available yet at this point.
>
> Test on OMAP3:
Thanks for testing!
> --- clk-old 2026-11-19 22:44:59.810807920 +0100
> +++ clk-new 2026-11-19 22:26:52.862531880 +0100
> @@ -1,17 +1,17 @@
> enable prepare protect duty hardware connection
> clock count count count rate accuracy phase cycle enable consumer id
> ---------------------------------------------------------------------------------------------------------------------------------------------
> - oscillator 0 0 0 26000000 0 0 50000 Y deviceless of_clk_get_from_provider
> + oscillator 0 0 0 26000000 0 0 50000 Y deviceless dev_clk_get_from_provider
> deviceless no_connection_id
> - secure_32k_fck 0 1 0 32768 0 0 50000 Y deviceless of_clk_get_from_provider
> + secure_32k_fck 0 1 0 32768 0 0 50000 Y deviceless dev_clk_get_from_provider
> deviceless no_connection_id
> - wdt1_fck 0 0 0 32768 0 0 50000 Y deviceless of_clk_get_from_provider
> + wdt1_fck 0 0 0 32768 0 0 50000 Y deviceless dev_clk_get_from_provider
> deviceless no_connection_id
> gpt12_fck 0 1 0 32768 0 0 50000 Y 48304000.timer fck
> 48304000.target-module fck
> - deviceless of_clk_get_from_provider
> + deviceless dev_clk_get_from_provider
> deviceless no_connection_id
> - dummy_ck 0 0 0 0 0 0 50000 Y deviceless of_clk_get_from_provider
> + dummy_ck 0 0 0 0 0 0 50000 Y deviceless dev_clk_get_from_provider
> deviceless no_connection_id
> mcbsp_clks 0 5 0 0 0 0 50000 Y deviceless mcbsp_clks
> deviceless mcbsp_clks
Hmm, so the passed device is always NULL, and thus there is no point
in making the change.
Do you know if these come from the first or second change in my patch
(I guess the second)?
Thanks again!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH 5/6] [RFT] ARM: OMAP2+: Convert to dev_clk_get_from_provider()
2026-11-20 7:49 ` Geert Uytterhoeven
@ 2026-11-20 8:43 ` Andreas Kemnade
2026-11-20 8:49 ` Geert Uytterhoeven
0 siblings, 1 reply; 19+ messages in thread
From: Andreas Kemnade @ 2026-11-20 8:43 UTC (permalink / raw)
To: Geert Uytterhoeven, ettore.chimenti
Cc: Aaro Koskinen, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Paul Walmsley, Stephen Boyd, Brian Masney,
Jerome Brunet, Sandy Huang, Heiko Stübner, Andy Yan,
Ulf Hansson, linux-clk, linux-renesas-soc, linux-rockchip,
linux-omap, linux-arm-kernel, dri-devel, linux-pm
On Fri, 20 Nov 2026 08:49:05 +0100
Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Hi Andreas,
>
> On Thu, 19 Nov 2026 at 22:50, Andreas Kemnade <andreas@kemnade.info> wrote:
> > On Thu, 19 Nov 2026 14:40:38 +0100
> > Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> >
> > > OMAP2+ clock handling uses of_clk_get_from_provider() to obtain clocks
> > > used for power management, so the latter show up as "deviceless" in the
> > > consumer column of the clk_summary file in debugfs.
> > >
> > > Fix this by using dev_clk_get_from_provider() instead, letting us pass
> > > the consumer device, too.
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > ---
> > > Compile-tested only.
> > >
> > > The first change is probably OK. The second change may fail if anything
> > > in the oh->od->pdev->dev chain is not available yet at this point.
> >
> > Test on OMAP3:
>
> Thanks for testing!
>
> > --- clk-old 2026-11-19 22:44:59.810807920 +0100
> > +++ clk-new 2026-11-19 22:26:52.862531880 +0100
> > @@ -1,17 +1,17 @@
> > enable prepare protect duty hardware connection
> > clock count count count rate accuracy phase cycle enable consumer id
> > ---------------------------------------------------------------------------------------------------------------------------------------------
> > - oscillator 0 0 0 26000000 0 0 50000 Y deviceless of_clk_get_from_provider
> > + oscillator 0 0 0 26000000 0 0 50000 Y deviceless dev_clk_get_from_provider
> > deviceless no_connection_id
> > - secure_32k_fck 0 1 0 32768 0 0 50000 Y deviceless of_clk_get_from_provider
> > + secure_32k_fck 0 1 0 32768 0 0 50000 Y deviceless dev_clk_get_from_provider
> > deviceless no_connection_id
> > - wdt1_fck 0 0 0 32768 0 0 50000 Y deviceless of_clk_get_from_provider
> > + wdt1_fck 0 0 0 32768 0 0 50000 Y deviceless dev_clk_get_from_provider
> > deviceless no_connection_id
> > gpt12_fck 0 1 0 32768 0 0 50000 Y 48304000.timer fck
> > 48304000.target-module fck
> > - deviceless of_clk_get_from_provider
> > + deviceless dev_clk_get_from_provider
> > deviceless no_connection_id
> > - dummy_ck 0 0 0 0 0 0 50000 Y deviceless of_clk_get_from_provider
> > + dummy_ck 0 0 0 0 0 0 50000 Y deviceless dev_clk_get_from_provider
> > deviceless no_connection_id
> > mcbsp_clks 0 5 0 0 0 0 50000 Y deviceless mcbsp_clks
> > deviceless mcbsp_clks
>
> Hmm, so the passed device is always NULL, and thus there is no point
> in making the change.
> Do you know if these come from the first or second change in my patch
> (I guess the second)?
>
From the first change, The second piece is nowadys only used by the dm81*
devices.
I would prefer to have this tested on dm81* too.
Regards,
Andreas
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/6] [RFT] ARM: OMAP2+: Convert to dev_clk_get_from_provider()
2026-11-20 8:43 ` Andreas Kemnade
@ 2026-11-20 8:49 ` Geert Uytterhoeven
2026-11-20 9:53 ` Andreas Kemnade
0 siblings, 1 reply; 19+ messages in thread
From: Geert Uytterhoeven @ 2026-11-20 8:49 UTC (permalink / raw)
To: Andreas Kemnade
Cc: ettore.chimenti, Aaro Koskinen, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson, linux-clk, linux-renesas-soc,
linux-rockchip, linux-omap, linux-arm-kernel, dri-devel, linux-pm
Hi Andreas,
On Fri, 20 Nov 2026 at 09:44, Andreas Kemnade <andreas@kemnade.info> wrote:
> On Fri, 20 Nov 2026 08:49:05 +0100
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Thu, 19 Nov 2026 at 22:50, Andreas Kemnade <andreas@kemnade.info> wrote:
> > > On Thu, 19 Nov 2026 14:40:38 +0100
> > > Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> > >
> > > > OMAP2+ clock handling uses of_clk_get_from_provider() to obtain clocks
> > > > used for power management, so the latter show up as "deviceless" in the
> > > > consumer column of the clk_summary file in debugfs.
> > > >
> > > > Fix this by using dev_clk_get_from_provider() instead, letting us pass
> > > > the consumer device, too.
> > > >
> > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > ---
> > > > Compile-tested only.
> > > >
> > > > The first change is probably OK. The second change may fail if anything
> > > > in the oh->od->pdev->dev chain is not available yet at this point.
> > >
> > > Test on OMAP3:
> >
> > Thanks for testing!
> >
> > > --- clk-old 2026-11-19 22:44:59.810807920 +0100
> > > +++ clk-new 2026-11-19 22:26:52.862531880 +0100
> > > @@ -1,17 +1,17 @@
> > > enable prepare protect duty hardware connection
> > > clock count count count rate accuracy phase cycle enable consumer id
> > > ---------------------------------------------------------------------------------------------------------------------------------------------
> > > - oscillator 0 0 0 26000000 0 0 50000 Y deviceless of_clk_get_from_provider
> > > + oscillator 0 0 0 26000000 0 0 50000 Y deviceless dev_clk_get_from_provider
> > > deviceless no_connection_id
deviceless
mcbsp_clks
> >
> > Hmm, so the passed device is always NULL, and thus there is no point
> > in making the change.
> > Do you know if these come from the first or second change in my patch
> > (I guess the second)?
> >
> From the first change, The second piece is nowadys only used by the dm81*
> devices.
Interesting. So that means all/some of the existing use of
&od->pdev->dev in _add_clkdev() is futile, as it may be NULL?
> I would prefer to have this tested on dm81* too.
Agreed.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH 5/6] [RFT] ARM: OMAP2+: Convert to dev_clk_get_from_provider()
2026-11-20 8:49 ` Geert Uytterhoeven
@ 2026-11-20 9:53 ` Andreas Kemnade
0 siblings, 0 replies; 19+ messages in thread
From: Andreas Kemnade @ 2026-11-20 9:53 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: ettore.chimenti, Aaro Koskinen, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson, linux-clk, linux-renesas-soc,
linux-rockchip, linux-omap, linux-arm-kernel, dri-devel, linux-pm
On Fri, 20 Nov 2026 09:49:39 +0100
Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Hi Andreas,
>
> On Fri, 20 Nov 2026 at 09:44, Andreas Kemnade <andreas@kemnade.info> wrote:
> > On Fri, 20 Nov 2026 08:49:05 +0100
> > Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Thu, 19 Nov 2026 at 22:50, Andreas Kemnade <andreas@kemnade.info> wrote:
> > > > On Thu, 19 Nov 2026 14:40:38 +0100
> > > > Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> > > >
> > > > > OMAP2+ clock handling uses of_clk_get_from_provider() to obtain clocks
> > > > > used for power management, so the latter show up as "deviceless" in the
> > > > > consumer column of the clk_summary file in debugfs.
> > > > >
> > > > > Fix this by using dev_clk_get_from_provider() instead, letting us pass
> > > > > the consumer device, too.
> > > > >
> > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > > ---
> > > > > Compile-tested only.
> > > > >
> > > > > The first change is probably OK. The second change may fail if anything
> > > > > in the oh->od->pdev->dev chain is not available yet at this point.
> > > >
> > > > Test on OMAP3:
> > >
> > > Thanks for testing!
> > >
> > > > --- clk-old 2026-11-19 22:44:59.810807920 +0100
> > > > +++ clk-new 2026-11-19 22:26:52.862531880 +0100
> > > > @@ -1,17 +1,17 @@
> > > > enable prepare protect duty hardware connection
> > > > clock count count count rate accuracy phase cycle enable consumer id
> > > > ---------------------------------------------------------------------------------------------------------------------------------------------
> > > > - oscillator 0 0 0 26000000 0 0 50000 Y deviceless of_clk_get_from_provider
> > > > + oscillator 0 0 0 26000000 0 0 50000 Y deviceless dev_clk_get_from_provider
> > > > deviceless no_connection_id
>
> deviceless
> mcbsp_clks
> > >
> > > Hmm, so the passed device is always NULL, and thus there is no point
> > > in making the change.
> > > Do you know if these come from the first or second change in my patch
> > > (I guess the second)?
> > >
> > From the first change, The second piece is nowadys only used by the dm81*
> > devices.
>
> Interesting. So that means all/some of the existing use of
> &od->pdev->dev in _add_clkdev() is futile, as it may be NULL?
>
I was wrong, it comes from neither. So lets start ftrace via cmdline...
ftrace=function ftrace_filter=dev_clk_get_from_provider
Piping the result through uniq -c
8 <idle>-0 [000] d.... 0.000000: dev_clk_get_from_provider <-ti_dt_clocks_register
66 <idle>-0 [000] d.... 0.000000: dev_clk_get_from_provider <-ti_clk_add_aliases
1 <idle>-0 [000] d.... 0.004913: dev_clk_get_from_provider <-of_clk_set_defaults
1 <idle>-0 [000] d.... 0.004974: dev_clk_get_from_provider <-of_clk_set_defaults
Regards,
Andreas
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/6] [RFT] ARM: OMAP2+: Convert to dev_clk_get_from_provider()
2026-11-19 13:40 ` [PATCH 5/6] [RFT] ARM: OMAP2+: " Geert Uytterhoeven
2026-11-19 21:50 ` Andreas Kemnade
@ 2026-11-20 1:40 ` Brian Masney
1 sibling, 0 replies; 19+ messages in thread
From: Brian Masney @ 2026-11-20 1:40 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson, linux-clk, linux-renesas-soc,
linux-rockchip, linux-omap, linux-arm-kernel, dri-devel, linux-pm,
Brian Masney
> OMAP2+ clock handling uses of_clk_get_from_provider() to obtain clocks
> used for power management, so the latter show up as "deviceless" in the
> consumer column of the clk_summary file in debugfs.
>
> Fix this by using dev_clk_get_from_provider() instead, letting us pass
> the consumer device, too.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <masneyb@kernel.org>
--
Brian Masney <masneyb@kernel.org>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 6/6] [RFC] pmdomain: renesas: r8a78000: Convert to dev_clk_get_from_provider()
2026-11-19 13:40 [PATCH 0/6] clk: Improve consumer field in debugfs clk_summary Geert Uytterhoeven
` (4 preceding siblings ...)
2026-11-19 13:40 ` [PATCH 5/6] [RFT] ARM: OMAP2+: " Geert Uytterhoeven
@ 2026-11-19 13:40 ` Geert Uytterhoeven
5 siblings, 0 replies; 19+ messages in thread
From: Geert Uytterhoeven @ 2026-11-19 13:40 UTC (permalink / raw)
To: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Paul Walmsley, Stephen Boyd,
Brian Masney, Jerome Brunet, Sandy Huang, Heiko Stübner,
Andy Yan, Ulf Hansson
Cc: linux-clk, linux-renesas-soc, linux-rockchip, linux-omap,
linux-arm-kernel, dri-devel, linux-pm, Geert Uytterhoeven
The R-Car X5H clock domain callback uses of_clk_get_from_provider() to
obtain clocks used for power management, so the latter show up as
"deviceless" in the consumer column of the clk_summary file in debugfs.
Fix this by using dev_clk_get_from_provider() instead, letting us pass
the consumer device, too.
Sample clk_summary change snippet on R-Car X5H Ironhide:
- hscif0 1 1 0 0 0 0 50000 Y deviceless dev_clk_get_from_provider
+ hscif0 1 1 0 0 0 0 50000 Y c0710000.serial dev_clk_get_from_provider
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
This depends on "[PATCH v5 14/15] pmdomain: renesas: r8a78000: Add SCMI
remapping support"
https://lore.kernel.org/e6816327da51f9fbeef67f13aac723b891e5042f.1795029012.git.geert+renesas@glider.be/
---
drivers/pmdomain/renesas/r8a78000-mdlc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pmdomain/renesas/r8a78000-mdlc.c b/drivers/pmdomain/renesas/r8a78000-mdlc.c
index 79f6f1a9ae95d245..bb8c9f2b68fbf746 100644
--- a/drivers/pmdomain/renesas/r8a78000-mdlc.c
+++ b/drivers/pmdomain/renesas/r8a78000-mdlc.c
@@ -232,7 +232,7 @@ static struct clk *scmi_get_clk(struct device *dev, struct device_node *np,
if (fw_id < 0)
return NULL;
- clk = of_clk_get_from_provider(&scmi_spec);
+ clk = dev_clk_get_from_provider(dev, &scmi_spec);
if (IS_ERR(clk))
dev_err(dev, "Cannot get SCMI clock %d: %pe\n", fw_id, clk);
else
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 19+ messages in thread