linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	jeremy.kerr@canonical.com, linux-clk@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] Convert clk-fixed into module platform driver
Date: Wed, 15 Jun 2016 00:59:15 +0200	[thread overview]
Message-ID: <CAPybu_1qTTn8tkdvJ8r1ehi4-ooJdPkmYJVvQdg71vsOJwoFUQ@mail.gmail.com> (raw)
In-Reply-To: <20160614173910.GB28218@codeaurora.org>

Hi Stephen

Assume this device tree overlay:


&bus0{

axi_clk: axi_clk {
compatible = "fixed-clock";
#clock-cells = <0x0>;
clock-frequency = <125000000>;
};

iic_0: iic {
#address-cells = <1>;
#size-cells = <1>;
compatible = "xlnx,xps-iic-2.00.a";
reg = < 0x00030000 0x10000 >;
interrupt-parent = <&xps_intc_0>;
interrupts = < 2 2 >;
clocks = <&axi_clk>;
 } ;

}

Which is basically a new i2c master and a fixed clock definition.

The fixed clock driver will only be probed to the driver at arch
initialization, when of_clk_init is called.  The device overlay can be
added at any point, usually after arch init. Which will result in ii_0
failing to probe,  because it is missing its clock.

This changeset allows fixed clocks to be added after of_clk_init is
called, by converting the driver into a platform driver.


Thanks!b

On Tue, Jun 14, 2016 at 7:39 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 06/08, Ricardo Ribalda Delgado wrote:
>> 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.
>
> Who's the provider here? It isn't clear to me why we're
> populating fixed factor and fixed rate clks from DT for i2c
> devices? Presumably there's an i2c device driver that should be
> populating clks from C code instead?
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project



-- 
Ricardo Ribalda

  reply	other threads:[~2016-06-14 22:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08 10:19 [PATCH 0/3] Convert clk-fixed into module platform driver Ricardo Ribalda Delgado
2016-06-08 10:19 ` [PATCH 1/3] clk: Add new function of_clk_is_provider() Ricardo Ribalda Delgado
2016-06-16  0:44   ` Stephen Boyd
2016-06-20 13:31     ` Ricardo Ribalda Delgado
2016-06-21  1:30       ` Stephen Boyd
2016-06-21  8:38         ` Ricardo Ribalda Delgado
2016-06-08 10:20 ` [PATCH 2/3] clk: fixed-factor: Convert into a module platform driver Ricardo Ribalda Delgado
2016-06-16  0:47   ` Stephen Boyd
2016-06-08 10:20 ` [PATCH 3/3] clk: fixed-rate: " Ricardo Ribalda Delgado
2016-06-14 17:39 ` [PATCH 0/3] Convert clk-fixed into " Stephen Boyd
2016-06-14 22:59   ` Ricardo Ribalda Delgado [this message]
2016-06-16  0:27     ` Stephen Boyd

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=CAPybu_1qTTn8tkdvJ8r1ehi4-ooJdPkmYJVvQdg71vsOJwoFUQ@mail.gmail.com \
    --to=ricardo.ribalda@gmail.com \
    --cc=jeremy.kerr@canonical.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.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 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).