lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 13 Jan 2015 11:24:49 -0800
From:	Mike Turquette <mturquette@...aro.org>
To:	Andrzej Hajda <a.hajda@...sung.com>,
	"open list" <linux-kernel@...r.kernel.org>
Cc:	"Andrzej Hajda <a.hajda@...sung.com>, Marek Szyprowski
	<m.szyprowski@...sung.com>, Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>, Russell King <linux@....linux.org.uk>,
	Linus Walleij <linus.walleij@...aro.org>, Alexandre Courbot
	<gnurou@...il.com>, Thierry Reding <thierry.reding@...il.com>, Inki Dae
	<inki.dae@...sung.com>, Kishon Vijay Abraham I <kishon@...com>, Liam
	Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, Grant
	Likely <grant.likely@...aro.org>, Rob Herring <robh+dt@...nel.org>,
	moderated list:ARM/CLKDEV SUPPORT <linux-arm-kernel@...ts.infradead.org>
	, open list:GPIO SUBSYSTEM <linux-gpio@...r.kernel.org>, open list:DRM
	PANEL DRIVERS <dri-devel@...ts.freedesktop.org>, moderated list:ARM/S5P
	EXYNOS AR... <linux-samsung-soc@...r.kernel.org>, open list:OPEN
	FIRMWARE AND..." <devicetree@...r.kernel.org>,
	boris.brezillon@...e-electrons.com, sboyd@...eaurora.org
Subject: Re: [RFC 07/15] clk: add DT parsing function

+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@...sung.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
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ