All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Michael Turquette <mturquette@baylibre.com>
Cc: Heiko Stuebner <heiko@sntech.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Chen-Yu Tsai <wens@csie.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-tegra@vger.kernel.org,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	linux-clk <linux-clk@vger.kernel.org>,
	"Stephen Boyd <sboyd@codeaurora.org>,
	Emilio Lopez <emilio@elopez.com.ar>,
	Hans de Goede <hdegoede@redhat.com>,
	linux-clk <linux-clk@vger.kernel.org>,
	linux-arm-kernel" <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/3] soc: rockchip: power-domain: Use of_clk_get_parent_count() instead of open coding
Date: Mon, 12 Mar 2018 15:32:25 -0700	[thread overview]
Message-ID: <152089394512.147033.16036395348488651030@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <CAMuHMdVsb+5T-DYfF9v6ANhVxhRk6_r+XPA34mW7Q=90HnitAA@mail.gmail.com>

Quoting Geert Uytterhoeven (2018-03-02 05:15:35)
> Hi Mike,
> 
> On Sun, Feb 18, 2018 at 8:09 PM, Michael Turquette
> <mturquette@baylibre.com> wrote:
> > Moving of_clk_get_parent_count to clk.h seems reasonable to me. It's
> > more of an of-specific helper than a provider-specific helper.
> >
> > Anyone up to submit a patch so that this one doesn't need to include
> > clk-provider.h?
> 
> I gave it a try.
> Just moving of_clk_get_parent_count() from clk-provider.h to clk.h causes
> breakage, as half of the clock providers using of_clk_get_parent_count()
> do not include <linux/clk.h>:
> 
>     drivers/clk/at91/clk-generated.c
>     drivers/clk/at91/clk-main.c
>     drivers/clk/at91/clk-master.c
>     drivers/clk/at91/clk-programmable.c
>     drivers/clk/at91/clk-slow.c
>     drivers/clk/at91/clk-smd.c
>     drivers/clk/at91/clk-usb.c
>     drivers/clk/at91/sckc.c
>     drivers/clk/clk-axi-clkgen.c
>     drivers/clk/clk-gpio.c
>     drivers/clk/clk-hsdk-pll.c
>     drivers/clk/h8300/clk-div.c
>     drivers/clk/h8300/clk-h8s2678.c
>     drivers/clk/renesas/clk-div6.c
>     drivers/clk/ti/composite.c
>     drivers/clk/ti/gate.c
>     drivers/clk/ti/mux.c
> 
> So our options are:
>   1. Add #include <linux/clk.h> to each of the above,
>   2. Add #include <linux/clk.h> to <linux/clk-provider.h>,
>   3. Do nothing, i.e. users of of_clk_get_parent_count () need to
>       #include <linux/clk-provider.h>, cfr. this patch series.
> 
> Any preference? Any option I'm missing?
> 

#2 is a definite no.

How about option #4? Move of_clk_get_parent_count() and
of_clk_get_parent_name() to a new include/linux/of_clk.h, include that
in clk-provider.h, and then have non-clk provider drivers include that
file? After that, we can also move of_clk_init() into this new file, and
then non-provider arch code can call of_clk_init() without including the
provider APIs. I'd also like to get rid of the include of linux/of.h in
clk-provider.h, but that's a ways away.

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Boyd <sboyd@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Michael Turquette <mturquette@baylibre.com>
Cc: Heiko Stuebner <heiko@sntech.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Chen-Yu Tsai <wens@csie.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-tegra@vger.kernel.org,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	linux-clk <linux-clk@vger.kernel.org>,
	"Stephen Boyd <sboyd@codeaurora.org>,
	Emilio Lopez <emilio@elopez.com.ar>,
	Hans de Goede <hdegoede@redhat.com>,
	linux-clk <linux-clk@vger.kernel.org>,
	linux-arm-kernel" <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/3] soc: rockchip: power-domain: Use of_clk_get_parent_count() instead of open coding
Date: Mon, 12 Mar 2018 15:32:25 -0700	[thread overview]
Message-ID: <152089394512.147033.16036395348488651030@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <CAMuHMdVsb+5T-DYfF9v6ANhVxhRk6_r+XPA34mW7Q=90HnitAA@mail.gmail.com>

Quoting Geert Uytterhoeven (2018-03-02 05:15:35)
> Hi Mike,
> =

> On Sun, Feb 18, 2018 at 8:09 PM, Michael Turquette
> <mturquette@baylibre.com> wrote:
> > Moving of_clk_get_parent_count to clk.h seems reasonable to me. It's
> > more of an of-specific helper than a provider-specific helper.
> >
> > Anyone up to submit a patch so that this one doesn't need to include
> > clk-provider.h?
> =

> I gave it a try.
> Just moving of_clk_get_parent_count() from clk-provider.h to clk.h causes
> breakage, as half of the clock providers using of_clk_get_parent_count()
> do not include <linux/clk.h>:
> =

>     drivers/clk/at91/clk-generated.c
>     drivers/clk/at91/clk-main.c
>     drivers/clk/at91/clk-master.c
>     drivers/clk/at91/clk-programmable.c
>     drivers/clk/at91/clk-slow.c
>     drivers/clk/at91/clk-smd.c
>     drivers/clk/at91/clk-usb.c
>     drivers/clk/at91/sckc.c
>     drivers/clk/clk-axi-clkgen.c
>     drivers/clk/clk-gpio.c
>     drivers/clk/clk-hsdk-pll.c
>     drivers/clk/h8300/clk-div.c
>     drivers/clk/h8300/clk-h8s2678.c
>     drivers/clk/renesas/clk-div6.c
>     drivers/clk/ti/composite.c
>     drivers/clk/ti/gate.c
>     drivers/clk/ti/mux.c
> =

> So our options are:
>   1. Add #include <linux/clk.h> to each of the above,
>   2. Add #include <linux/clk.h> to <linux/clk-provider.h>,
>   3. Do nothing, i.e. users of of_clk_get_parent_count () need to
>       #include <linux/clk-provider.h>, cfr. this patch series.
> =

> Any preference? Any option I'm missing?
> =


#2 is a definite no.

How about option #4? Move of_clk_get_parent_count() and
of_clk_get_parent_name() to a new include/linux/of_clk.h, include that
in clk-provider.h, and then have non-clk provider drivers include that
file? After that, we can also move of_clk_init() into this new file, and
then non-provider arch code can call of_clk_init() without including the
provider APIs. I'd also like to get rid of the include of linux/of.h in
clk-provider.h, but that's a ways away.

WARNING: multiple messages have this Message-ID (diff)
From: sboyd@kernel.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] soc: rockchip: power-domain: Use of_clk_get_parent_count() instead of open coding
Date: Mon, 12 Mar 2018 15:32:25 -0700	[thread overview]
Message-ID: <152089394512.147033.16036395348488651030@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <CAMuHMdVsb+5T-DYfF9v6ANhVxhRk6_r+XPA34mW7Q=90HnitAA@mail.gmail.com>

Quoting Geert Uytterhoeven (2018-03-02 05:15:35)
> Hi Mike,
> 
> On Sun, Feb 18, 2018 at 8:09 PM, Michael Turquette
> <mturquette@baylibre.com> wrote:
> > Moving of_clk_get_parent_count to clk.h seems reasonable to me. It's
> > more of an of-specific helper than a provider-specific helper.
> >
> > Anyone up to submit a patch so that this one doesn't need to include
> > clk-provider.h?
> 
> I gave it a try.
> Just moving of_clk_get_parent_count() from clk-provider.h to clk.h causes
> breakage, as half of the clock providers using of_clk_get_parent_count()
> do not include <linux/clk.h>:
> 
>     drivers/clk/at91/clk-generated.c
>     drivers/clk/at91/clk-main.c
>     drivers/clk/at91/clk-master.c
>     drivers/clk/at91/clk-programmable.c
>     drivers/clk/at91/clk-slow.c
>     drivers/clk/at91/clk-smd.c
>     drivers/clk/at91/clk-usb.c
>     drivers/clk/at91/sckc.c
>     drivers/clk/clk-axi-clkgen.c
>     drivers/clk/clk-gpio.c
>     drivers/clk/clk-hsdk-pll.c
>     drivers/clk/h8300/clk-div.c
>     drivers/clk/h8300/clk-h8s2678.c
>     drivers/clk/renesas/clk-div6.c
>     drivers/clk/ti/composite.c
>     drivers/clk/ti/gate.c
>     drivers/clk/ti/mux.c
> 
> So our options are:
>   1. Add #include <linux/clk.h> to each of the above,
>   2. Add #include <linux/clk.h> to <linux/clk-provider.h>,
>   3. Do nothing, i.e. users of of_clk_get_parent_count () need to
>       #include <linux/clk-provider.h>, cfr. this patch series.
> 
> Any preference? Any option I'm missing?
> 

#2 is a definite no.

How about option #4? Move of_clk_get_parent_count() and
of_clk_get_parent_name() to a new include/linux/of_clk.h, include that
in clk-provider.h, and then have non-clk provider drivers include that
file? After that, we can also move of_clk_init() into this new file, and
then non-provider arch code can call of_clk_init() without including the
provider APIs. I'd also like to get rid of the include of linux/of.h in
clk-provider.h, but that's a ways away.

  reply	other threads:[~2018-03-12 22:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 15:18 [PATCH 0/3] Use of_clk_get_parent_count() instead of open coding Geert Uytterhoeven
2018-01-19 15:18 ` [PATCH 2/3] soc: rockchip: power-domain: " Geert Uytterhoeven
2018-01-19 15:18   ` Geert Uytterhoeven
2018-02-10 16:35   ` Heiko Stuebner
2018-02-10 16:35     ` Heiko Stuebner
2018-02-18 19:09     ` Michael Turquette
2018-02-18 19:09       ` Michael Turquette
2018-02-18 19:09       ` Michael Turquette
2018-03-02 13:15       ` Geert Uytterhoeven
2018-03-02 13:15         ` Geert Uytterhoeven
2018-03-02 13:15         ` Geert Uytterhoeven
2018-03-12 22:32         ` Stephen Boyd [this message]
2018-03-12 22:32           ` Stephen Boyd
2018-03-12 22:32           ` Stephen Boyd
     [not found] ` <1516375101-29836-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2018-01-19 15:18   ` [PATCH 1/3] pinctrl: sunxi: " Geert Uytterhoeven
2018-01-19 15:18     ` Geert Uytterhoeven
2018-01-22  8:55     ` Linus Walleij
2018-01-22  8:55       ` Linus Walleij
2018-01-19 15:18   ` [PATCH 3/3] soc/tegra: pmc: " Geert Uytterhoeven
2018-01-19 15:18     ` Geert Uytterhoeven
2018-01-19 15:18     ` Geert Uytterhoeven

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=152089394512.147033.16036395348488651030@swboyd.mtv.corp.google.com \
    --to=sboyd@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --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-rockchip@lists.infradead.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --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: 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.