From: Mike Turquette <mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: open list <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: "Andrzej Hajda <a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Marek Szyprowski
<m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Inki Dae <inki.dae-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>,
Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
moderated list:ARM/CLKDEV SUPPORT
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
, open list:GPIO SUBSYSTEM
<linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
open list:DRM PANEL DRIVERS
<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
moderated list:ARM/S5P EXYNOS AR...
<linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
open list:OPEN FIRMWARE AND..."
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org,
sboyd@co
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-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
+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-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> ---
> 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
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-01-13 19:24 UTC|newest]
Thread overview: 35+ 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
[not found] ` <1418226513-14105-5-git-send-email-a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
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:21 ` Andrzej Hajda
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
[not found] ` <1418226513-14105-8-git-send-email-a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-13 19:24 ` Mike Turquette [this message]
2014-12-10 15:48 ` [RFC 08/15] clk: add restrack support Andrzej Hajda
[not found] ` <1418226513-14105-9-git-send-email-a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
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
2014-12-10 17:23 ` A H
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-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sboyd@co \
/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