From: Mike Turquette <mturquette@linaro.org>
To: Andrzej Hajda <a.hajda@samsung.com>,
"open list" <linux-kernel@vger.kernel.org>
Cc: "Andrzej Hajda <a.hajda@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Russell King <linux@arm.linux.org.uk>,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
Thierry Reding <thierry.reding@gmail.com>,
Inki Dae <inki.dae@samsung.com>,
Kishon Vijay Abraham I <kishon@ti.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
moderated list:ARM/CLKDEV SUPPORT
<linux-arm-kernel@lists.infradead.org> ,
open list:GPIO SUBSYSTEM <linux-gpio@vger.kernel.org>,
open list:DRM PANEL DRIVERS <dri-devel@lists.freedesktop.org>,
moderated list:ARM/S5P EXYNOS AR...
<linux-samsung-soc@vger.kernel.org>,
open list:OPEN FIRMWARE AND...", <devicetree@vger.kernel.org>,
boris.brezillon@free-electrons.com, sboyd@codeaurora.org
Subject: Re: [RFC 07/15] clk: add DT parsing function
Date: Tue, 13 Jan 2015 11:24:49 -0800 [thread overview]
Message-ID: <20150113192449.20842.60390@quantum> (raw)
In-Reply-To: <1418226513-14105-8-git-send-email-a.hajda@samsung.com>
+Stephen Boyd
Quoting Andrzej Hajda (2014-12-10 07:48:25)
> The patch adds function for parsing Device Tree to get
> clock specifier. The function could be ultimately used
> by clock core.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> drivers/clk/clkdev.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
> index da4bda8..bd22750 100644
> --- a/drivers/clk/clkdev.c
> +++ b/drivers/clk/clkdev.c
> @@ -120,6 +120,29 @@ struct clk *of_clk_get_by_name(struct device_node *np, const char *name)
> return clk;
> }
> EXPORT_SYMBOL(of_clk_get_by_name);
> +
> +static int of_get_clock_spec(struct device *dev, const char *name,
> + struct of_phandle_args *spec)
> +{
> + struct device_node *np = dev->of_node;
> +
> + while (np) {
> + int idx = 0;
> +
> + if (name)
> + idx = of_property_match_string(np, "clock-names", name);
> +
> + if (!of_parse_phandle_with_args(np, "clocks", "#clock-cells",
> + idx, spec))
> + return 0;
> +
> + np = np->parent;
> + if (np && !of_get_property(np, "clock-ranges", NULL))
> + break;
> + }
> +
> + return -ENOENT;
> +}
> #endif
>
> /*
> --
> 1.9.1
>
next prev parent reply other threads:[~2015-01-13 19:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-10 15:48 [RFC 00/15] Resource tracking/allocation framework Andrzej Hajda
2014-12-10 15:48 ` [RFC 01/15] drivers/base: add track framework Andrzej Hajda
2014-12-12 16:36 ` Mark Brown
2014-12-12 23:12 ` AH
2014-12-15 12:55 ` Mark Brown
2014-12-15 14:00 ` Andrzej Hajda
2014-12-10 15:48 ` [RFC 02/15] drivers/base: add restrack framework Andrzej Hajda
2014-12-12 16:52 ` Mark Brown
2014-12-15 8:28 ` Andrzej Hajda
2014-12-15 11:38 ` Mark Brown
2014-12-10 15:48 ` [RFC 03/15] drm/panel: add restrack support Andrzej Hajda
2014-12-10 15:48 ` [RFC 04/15] regulator: " Andrzej Hajda
2014-12-10 16:07 ` Mark Brown
2014-12-11 10:49 ` Andrzej Hajda
2014-12-11 12:58 ` Mark Brown
2014-12-11 13:43 ` Russell King - ARM Linux
2014-12-12 8:22 ` Andrzej Hajda
2014-12-10 15:48 ` [RFC 05/15] gpio: move DT parsing code to separate functions Andrzej Hajda
2015-01-13 6:17 ` Linus Walleij
2014-12-10 15:48 ` [RFC 06/15] gpio: add restrack support Andrzej Hajda
2014-12-10 15:48 ` [RFC 07/15] clk: add DT parsing function Andrzej Hajda
2015-01-13 19:24 ` Mike Turquette [this message]
2014-12-10 15:48 ` [RFC 08/15] clk: add restrack support Andrzej Hajda
2015-01-13 19:25 ` Mike Turquette
2014-12-10 15:48 ` [RFC 09/15] phy: " Andrzej Hajda
2014-12-10 15:48 ` [RFC 10/15] drm/exynos/dsi: simplify hotplug code Andrzej Hajda
2014-12-10 15:48 ` [RFC 11/15] drm/exynos/dsi: convert to restrack API Andrzej Hajda
2014-12-10 15:48 ` [RFC 12/15] drm/exynos/dpi: use common of_graph functions Andrzej Hajda
2014-12-10 15:48 ` [RFC 13/15] drm/exynos/dpi: convert to restrack API Andrzej Hajda
2014-12-10 15:48 ` [RFC 14/15] drm/panel/ld9040: do not power off panel on removal Andrzej Hajda
2014-12-10 15:48 ` [RFC 15/15] drm/panel/ld9040: convert to restrack API Andrzej Hajda
2014-12-10 16:16 ` [RFC 00/15] Resource tracking/allocation framework Russell King - ARM Linux
[not found] ` <CA+tnuKYSDZ0mtzQ_g1QjovJwG01OgPjSXuozEBXQsEZv_2o-=w@mail.gmail.com>
2014-12-10 17:39 ` Russell King - ARM Linux
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=20150113192449.20842.60390@quantum \
--to=mturquette@linaro.org \
--cc=a.hajda@samsung.com \
--cc=boris.brezillon@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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