From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Russell King <linux@armlinux.org.uk>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Antoine Tenart <antoine.tenart@bootlin.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Nadav Haklai <nadavh@marvell.com>
Subject: Re: [PATCH v4 4/4] clk: mvebu: armada-37xx-xtal: fill the device entry when registering the clock
Date: Fri, 18 Jan 2019 15:16:49 +0100 [thread overview]
Message-ID: <87won2m4oe.fsf@FE-laptop> (raw)
In-Reply-To: <20190108161940.4814-5-miquel.raynal@bootlin.com> (Miquel Raynal's message of "Tue, 8 Jan 2019 17:19:40 +0100")
Hi Miquel,
On mar., janv. 08 2019, Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> So far the clk_hw_register_fixed_factor() call was not providing any
> device structure. While doing so is harmless for regular use, the
> missing device structure may be a problem for suspend to RAM support.
>
> Since, device links have been added to clocks, links created during
> probe will enforce the suspend/resume orders. When the device is
> missing during the registration, no link can be established, hence the
> order between parent and child clocks are not enforced.
>
> Adding the device structure here will create a link between the XTAL
> clock (this one) and the four TBG clocks that are derived from it.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Thanks,
Gregory
> ---
> drivers/clk/mvebu/armada-37xx-xtal.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/mvebu/armada-37xx-xtal.c b/drivers/clk/mvebu/armada-37xx-xtal.c
> index e9e306d4e9af..0e74bcd83d1a 100644
> --- a/drivers/clk/mvebu/armada-37xx-xtal.c
> +++ b/drivers/clk/mvebu/armada-37xx-xtal.c
> @@ -57,7 +57,8 @@ static int armada_3700_xtal_clock_probe(struct platform_device *pdev)
> rate = 25000000;
>
> of_property_read_string_index(np, "clock-output-names", 0, &xtal_name);
> - xtal_hw = clk_hw_register_fixed_rate(NULL, xtal_name, NULL, 0, rate);
> + xtal_hw = clk_hw_register_fixed_rate(&pdev->dev, xtal_name, NULL, 0,
> + rate);
> if (IS_ERR(xtal_hw))
> return PTR_ERR(xtal_hw);
> ret = of_clk_add_hw_provider(np, of_clk_hw_simple_get, xtal_hw);
> --
> 2.19.1
>
--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com
WARNING: multiple messages have this Message-ID (diff)
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
linux-kernel@vger.kernel.org,
Russell King <linux@armlinux.org.uk>,
Nadav Haklai <nadavh@marvell.com>,
Antoine Tenart <antoine.tenart@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 4/4] clk: mvebu: armada-37xx-xtal: fill the device entry when registering the clock
Date: Fri, 18 Jan 2019 15:16:49 +0100 [thread overview]
Message-ID: <87won2m4oe.fsf@FE-laptop> (raw)
In-Reply-To: <20190108161940.4814-5-miquel.raynal@bootlin.com> (Miquel Raynal's message of "Tue, 8 Jan 2019 17:19:40 +0100")
Hi Miquel,
On mar., janv. 08 2019, Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> So far the clk_hw_register_fixed_factor() call was not providing any
> device structure. While doing so is harmless for regular use, the
> missing device structure may be a problem for suspend to RAM support.
>
> Since, device links have been added to clocks, links created during
> probe will enforce the suspend/resume orders. When the device is
> missing during the registration, no link can be established, hence the
> order between parent and child clocks are not enforced.
>
> Adding the device structure here will create a link between the XTAL
> clock (this one) and the four TBG clocks that are derived from it.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Thanks,
Gregory
> ---
> drivers/clk/mvebu/armada-37xx-xtal.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/mvebu/armada-37xx-xtal.c b/drivers/clk/mvebu/armada-37xx-xtal.c
> index e9e306d4e9af..0e74bcd83d1a 100644
> --- a/drivers/clk/mvebu/armada-37xx-xtal.c
> +++ b/drivers/clk/mvebu/armada-37xx-xtal.c
> @@ -57,7 +57,8 @@ static int armada_3700_xtal_clock_probe(struct platform_device *pdev)
> rate = 25000000;
>
> of_property_read_string_index(np, "clock-output-names", 0, &xtal_name);
> - xtal_hw = clk_hw_register_fixed_rate(NULL, xtal_name, NULL, 0, rate);
> + xtal_hw = clk_hw_register_fixed_rate(&pdev->dev, xtal_name, NULL, 0,
> + rate);
> if (IS_ERR(xtal_hw))
> return PTR_ERR(xtal_hw);
> ret = of_clk_add_hw_provider(np, of_clk_hw_simple_get, xtal_hw);
> --
> 2.19.1
>
--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-01-18 14:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-08 16:19 [PATCH v4 0/4] Add device links to clocks Miquel Raynal
2019-01-08 16:19 ` Miquel Raynal
2019-01-08 16:19 ` [PATCH v4 1/4] clk: core: link consumer with clock driver Miquel Raynal
2019-01-08 16:19 ` Miquel Raynal
2019-01-08 16:19 ` [PATCH v4 2/4] clk: mvebu: armada-37xx-tbg: fix error message Miquel Raynal
2019-01-08 16:19 ` Miquel Raynal
2019-01-18 14:16 ` Gregory CLEMENT
2019-01-18 14:16 ` Gregory CLEMENT
2019-01-08 16:19 ` [PATCH v4 3/4] clk: mvebu: armada-37xx-tbg: fill the device entry when registering the clocks Miquel Raynal
2019-01-08 16:19 ` Miquel Raynal
2019-01-18 14:16 ` Gregory CLEMENT
2019-01-18 14:16 ` Gregory CLEMENT
2019-01-08 16:19 ` [PATCH v4 4/4] clk: mvebu: armada-37xx-xtal: fill the device entry when registering the clock Miquel Raynal
2019-01-08 16:19 ` Miquel Raynal
2019-01-18 14:16 ` Gregory CLEMENT [this message]
2019-01-18 14:16 ` Gregory CLEMENT
2019-04-11 23:34 ` [PATCH v4 0/4] Add device links to clocks Stephen Boyd
2019-04-11 23:34 ` Stephen Boyd
2019-05-21 9:46 ` Miquel Raynal
2019-05-21 9:46 ` Miquel Raynal
2019-06-17 9:57 ` Miquel Raynal
2019-06-17 9:57 ` Miquel Raynal
2019-07-27 8:53 ` Miquel Raynal
2019-07-27 8:53 ` Miquel Raynal
2019-08-14 18:41 ` Stephen Boyd
2019-08-14 18:41 ` 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=87won2m4oe.fsf@FE-laptop \
--to=gregory.clement@bootlin.com \
--cc=antoine.tenart@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=miquel.raynal@bootlin.com \
--cc=mturquette@baylibre.com \
--cc=nadavh@marvell.com \
--cc=sboyd@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/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.