All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: ettore.chimenti@linaro.org,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Kevin Hilman" <khilman@baylibre.com>,
	"Roger Quadros" <rogerq@kernel.org>,
	"Tony Lindgren" <tony@atomide.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Paul Walmsley" <paul@pwsan.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Brian Masney" <bmasney+clk@redhat.com>,
	"Jerome Brunet" <jbrunet+clk@baylibre.com>,
	"Sandy Huang" <hjc@rock-chips.com>,
	"Heiko Stübner" <heiko@sntech.de>, "Andy Yan" <andyshrk@163.com>,
	"Ulf Hansson" <ulfh@kernel.org>,
	linux-clk@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-rockchip@lists.infradead.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 5/6] [RFT] ARM: OMAP2+: Convert to dev_clk_get_from_provider()
Date: Fri, 20 Nov 2026 10:53:14 +0100	[thread overview]
Message-ID: <20261120105314.57a13a83@kemnade.info> (raw)
In-Reply-To: <CAMuHMdWiCODz6RC9Q9-xMM5_k3grHztiLuR+-ikOZYoBawVvZg@mail.gmail.com>

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



WARNING: multiple messages have this Message-ID (diff)
From: Andreas Kemnade <andreas@kemnade.info>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: ettore.chimenti@linaro.org,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Kevin Hilman" <khilman@baylibre.com>,
	"Roger Quadros" <rogerq@kernel.org>,
	"Tony Lindgren" <tony@atomide.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Paul Walmsley" <paul@pwsan.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Brian Masney" <bmasney+clk@redhat.com>,
	"Jerome Brunet" <jbrunet+clk@baylibre.com>,
	"Sandy Huang" <hjc@rock-chips.com>,
	"Heiko Stübner" <heiko@sntech.de>, "Andy Yan" <andyshrk@163.com>,
	"Ulf Hansson" <ulfh@kernel.org>,
	linux-clk@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-rockchip@lists.infradead.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 5/6] [RFT] ARM: OMAP2+: Convert to dev_clk_get_from_provider()
Date: Fri, 20 Nov 2026 10:53:14 +0100	[thread overview]
Message-ID: <20261120105314.57a13a83@kemnade.info> (raw)
In-Reply-To: <CAMuHMdWiCODz6RC9Q9-xMM5_k3grHztiLuR+-ikOZYoBawVvZg@mail.gmail.com>

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

  reply	other threads:[~2026-11-20  9:53 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-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-20  1:40     ` Brian Masney
2026-11-20  7:44     ` Geert Uytterhoeven
2026-11-20  7:44       ` Geert Uytterhoeven
2026-11-20 16:56       ` Brian Masney
2026-11-20 16:56         ` Brian Masney
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-20  1:40     ` Brian Masney
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-20  1:40     ` Brian Masney
2026-11-19 13:40 ` [PATCH 4/6] [RFT] drm/rockchip: dw_hdmi: " Geert Uytterhoeven
2026-11-19 13:40   ` Geert Uytterhoeven
2026-11-20  1:40   ` Brian Masney
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   ` Geert Uytterhoeven
2026-11-19 21:50   ` Andreas Kemnade
2026-11-19 21:50     ` Andreas Kemnade
2026-11-20  7:49     ` Geert Uytterhoeven
2026-11-20  7:49       ` Geert Uytterhoeven
2026-11-20  8:43       ` Andreas Kemnade
2026-11-20  8:43         ` Andreas Kemnade
2026-11-20  8:49         ` Geert Uytterhoeven
2026-11-20  8:49           ` Geert Uytterhoeven
2026-11-20  9:53           ` Andreas Kemnade [this message]
2026-11-20  9:53             ` Andreas Kemnade
2026-11-20  1:40   ` Brian Masney
2026-11-20  1:40     ` Brian Masney
2026-11-19 13:40 ` [PATCH 6/6] [RFC] pmdomain: renesas: r8a78000: " Geert Uytterhoeven
2026-11-19 13:40   ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261120105314.57a13a83@kemnade.info \
    --to=andreas@kemnade.info \
    --cc=aaro.koskinen@iki.fi \
    --cc=andyshrk@163.com \
    --cc=bmasney+clk@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ettore.chimenti@linaro.org \
    --cc=geert@linux-m68k.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=jbrunet+clk@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=paul@pwsan.com \
    --cc=rogerq@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tony@atomide.com \
    --cc=ulfh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.