All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>, atull@kernel.org
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-clk@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	frowand.list@gmail.com
Subject: Re: [PATCH v5 8/8] clk: fixed-rate: Convert into a module platform driver
Date: Thu, 18 Oct 2018 13:25:14 -0700	[thread overview]
Message-ID: <153989431481.53599.12103308080212712307@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <CAPybu_2MyMyM9PXANowPkZ2LjnCUarNJmyHR+-bAowPNxVUThw@mail.gmail.com>

Quoting Ricardo Ribalda Delgado (2018-10-18 13:02:01)
> Hi Alan
> 
> 
> On Thu, Oct 18, 2018 at 9:21 PM Alan Tull <atull@kernel.org> wrote:
> >
> > On Tue, Jul 5, 2016 at 11:45 AM Ricardo Ribalda Delgado
> > <ricardo.ribalda@gmail.com> wrote:
> >
> > I've stumbled across a of_node_get/put imbalance that happens when the
> > fixed rate clock is added and deleted using device tree.  The cause is
> > that this driver calls of_clk_add_provider() when probed, but doesn't
> > call of_clk_del_provider() when removed.
> >
> > It looks like a lot of clock drivers share that issue:
> >
> > $ cd drivers/clk/
> > $ git grep -l of_clk_add_provider * | xargs grep -L of_clk_del_provider | wc -l
> > 131
> >
> > It should be a one line fix, but for many files.
> >
> > I'm not a clock subsystem expert, so please let me know whether I'm
> > missing something here.
> 
> Not an expert either, but I believe that the affected drivers are much
> less. We have to consider only the drivers that can be removed
> 
> git grep -l  of_clk_add_provider  | xargs grep -l platform_driver |
> xargs grep -l  remove | xargs grep -L of_clk_del_provider
> drivers/clk/clk-fixed-factor.c
> drivers/clk/clk-fixed-rate.c
> drivers/clk/davinci/psc.c
> drivers/clk/ti/adpll.c
> drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c
> 
> 
> Also there is something else that I do not undersand:
> of_clk_add_hw_provider() is the same as of_clk_add_provider() ?

The difference is the hw provider API deals with struct clk_hw and the
other API deals with struct clk pointers. The preference is to use the
clk_hw based APIs.


  reply	other threads:[~2018-10-18 20:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=153989431481.53599.12103308080212712307@swboyd.mtv.corp.google.com \
    --to=sboyd@kernel.org \
    --cc=atull@kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=ricardo.ribalda@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@codeaurora.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.