From: Geert Uytterhoeven <geert+renesas@glider.be> To: Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org> Cc: Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>, Daniel Lezcano <daniel.lezcano@linaro.org>, Thomas Gleixner <tglx@linutronix.de>, Maxime Ripard <maxime.ripard@bootlin.com>, Chen-Yu Tsai <wens@csie.org>, Linus Walleij <linus.walleij@linaro.org>, Heiko Stuebner <heiko@sntech.de>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.com>, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be> Subject: [PATCH v2 5/5] pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding Date: Tue, 10 Apr 2018 14:51:41 +0200 [thread overview] Message-ID: <1523364701-15383-6-git-send-email-geert+renesas@glider.be> (raw) In-Reply-To: <1523364701-15383-1-git-send-email-geert+renesas@glider.be> A new open coder has crept in since 470b73a38470e8ba ("pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding"), replace it. of_clk_get_parent_count() was moved to <linux/of_clk.h>, so include that instead of <linux/clk-provider.h>. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- This depends on "[PATCH v2 1/5] clk: Extract OF clock helpers in <linux/of_clk.h>". v2: - New. --- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 020d6d84639ca002..25e80a5370ca02f6 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -12,12 +12,12 @@ #include <linux/io.h> #include <linux/clk.h> -#include <linux/clk-provider.h> #include <linux/gpio/driver.h> #include <linux/irqdomain.h> #include <linux/irqchip/chained_irq.h> #include <linux/export.h> #include <linux/of.h> +#include <linux/of_clk.h> #include <linux/of_address.h> #include <linux/of_device.h> #include <linux/of_irq.h> @@ -1361,7 +1361,7 @@ int sunxi_pinctrl_init_with_variant(struct platform_device *pdev, goto gpiochip_error; } - ret = of_count_phandle_with_args(node, "clocks", "#clock-cells"); + ret = of_clk_get_parent_count(node); clk = devm_clk_get(&pdev->dev, ret == 1 ? NULL : "apb"); if (IS_ERR(clk)) { ret = PTR_ERR(clk); -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: geert+renesas@glider.be (Geert Uytterhoeven) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 5/5] pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding Date: Tue, 10 Apr 2018 14:51:41 +0200 [thread overview] Message-ID: <1523364701-15383-6-git-send-email-geert+renesas@glider.be> (raw) In-Reply-To: <1523364701-15383-1-git-send-email-geert+renesas@glider.be> A new open coder has crept in since 470b73a38470e8ba ("pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding"), replace it. of_clk_get_parent_count() was moved to <linux/of_clk.h>, so include that instead of <linux/clk-provider.h>. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- This depends on "[PATCH v2 1/5] clk: Extract OF clock helpers in <linux/of_clk.h>". v2: - New. --- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 020d6d84639ca002..25e80a5370ca02f6 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -12,12 +12,12 @@ #include <linux/io.h> #include <linux/clk.h> -#include <linux/clk-provider.h> #include <linux/gpio/driver.h> #include <linux/irqdomain.h> #include <linux/irqchip/chained_irq.h> #include <linux/export.h> #include <linux/of.h> +#include <linux/of_clk.h> #include <linux/of_address.h> #include <linux/of_device.h> #include <linux/of_irq.h> @@ -1361,7 +1361,7 @@ int sunxi_pinctrl_init_with_variant(struct platform_device *pdev, goto gpiochip_error; } - ret = of_count_phandle_with_args(node, "clocks", "#clock-cells"); + ret = of_clk_get_parent_count(node); clk = devm_clk_get(&pdev->dev, ret == 1 ? NULL : "apb"); if (IS_ERR(clk)) { ret = PTR_ERR(clk); -- 2.7.4
next prev parent reply other threads:[~2018-04-10 12:51 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-10 12:51 [PATCH v2 0/5] Use of_clk_get_parent_count() instead of open coding Geert Uytterhoeven 2018-04-10 12:51 ` Geert Uytterhoeven 2018-04-10 12:51 ` [PATCH v2 1/5] clk: Extract OF clock helpers in <linux/of_clk.h> Geert Uytterhoeven 2018-04-10 12:51 ` Geert Uytterhoeven 2018-04-10 13:15 ` Heiko Stuebner 2018-04-10 13:15 ` Heiko Stuebner 2018-04-13 21:16 ` Rob Herring 2018-04-13 21:16 ` Rob Herring 2018-04-16 16:05 ` Stephen Boyd 2018-04-16 16:05 ` Stephen Boyd 2018-04-16 16:05 ` Stephen Boyd 2018-04-16 16:05 ` Stephen Boyd 2018-04-10 12:51 ` [PATCH v2 2/5] ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding Geert Uytterhoeven 2018-04-10 12:51 ` Geert Uytterhoeven 2018-04-17 8:50 ` Daniel Lezcano 2018-04-17 8:50 ` Daniel Lezcano 2018-04-26 11:56 ` Linus Walleij 2018-04-26 11:56 ` Linus Walleij 2018-04-26 11:56 ` Linus Walleij 2018-04-10 12:51 ` [PATCH v2 3/5] soc: rockchip: power-domain: " Geert Uytterhoeven 2018-04-10 12:51 ` Geert Uytterhoeven 2018-04-10 13:17 ` Heiko Stuebner 2018-04-10 13:17 ` Heiko Stuebner 2018-04-10 12:51 ` [PATCH v2 4/5] soc/tegra: pmc: " Geert Uytterhoeven 2018-04-10 12:51 ` Geert Uytterhoeven 2018-04-11 9:07 ` Jon Hunter 2018-04-11 9:07 ` Jon Hunter 2018-04-11 9:07 ` Jon Hunter 2018-04-10 12:51 ` Geert Uytterhoeven [this message] 2018-04-10 12:51 ` [PATCH v2 5/5] pinctrl: sunxi: " Geert Uytterhoeven 2018-04-10 13:01 ` Maxime Ripard 2018-04-10 13:01 ` Maxime Ripard
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=1523364701-15383-6-git-send-email-geert+renesas@glider.be \ --to=geert+renesas@glider.be \ --cc=daniel.lezcano@linaro.org \ --cc=devicetree@vger.kernel.org \ --cc=frowand.list@gmail.com \ --cc=heiko@sntech.de \ --cc=jonathanh@nvidia.com \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-clk@vger.kernel.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=linux-tegra@vger.kernel.org \ --cc=maxime.ripard@bootlin.com \ --cc=mturquette@baylibre.com \ --cc=robh+dt@kernel.org \ --cc=sboyd@kernel.org \ --cc=tglx@linutronix.de \ --cc=thierry.reding@gmail.com \ --cc=wens@csie.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: linkBe 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.