All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Ulrich Hecht <ulrich.hecht+renesas@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Grant Likely <grant.likely@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC 0/3] Add "Simple" / Renesas Bus State Controller Driver
Date: Wed, 26 Nov 2014 20:11:12 +0000	[thread overview]
Message-ID: <7h4mtlen8f.fsf@deeprootsystems.com> (raw)
In-Reply-To: <CAMuHMdVjpL-QgS0aAdMo4EHXibhpKCJC73yY+HDY=+Ae=LMigA@mail.gmail.com> (Geert Uytterhoeven's message of "Mon, 24 Nov 2014 21:27:06 +0100")

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> Hi Arnd,
>
> On Mon, Nov 24, 2014 at 9:15 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Monday 24 November 2014 21:10:05 Geert Uytterhoeven wrote:
>>> As this minimal BSC driver isn't hardware-specific at all, I'm wondering
>>> if there's a simpler way to do this?
>>>   - Should the driver be renamed to "simple-bus", and match "simple-bus"?
>>>   - Should this be moved to core code, without an explicit driver for
>>>     "simple-bus"? I.e. should the driver core just enable runtime PM for
>>>     all devices not bound to a driver, as they may represent buses with
>>>     child devices that do rely on runtime PM?
>>>
>>> Thanks for your comments and suggestions!
>>
>> My understanding of simple-bus is that it's something that does
>> not have any power-management capabilities, and I'd rather not
>> add clocks or interrupts to it.
>
> OK.
>
>> What I think makes more sense is to have a bus driver for it
>> in drivers/bus, remove the "simple-bus" compatibility value
>> and have the driver take care of registering the power domain
>> and probing the child devices using of_platform_populate on
>> itself.
>
> Registering power domains is already handled by the core code.
>
> So compared to my RFC code, I only have to
>   1. Drop "simple-bus" from the compatible property in the .dtsi,
>   2. Call of_platform_populate() from renesas_bsc_probe(), to
>      register the child devices, now the core code no longer does that.
>
> I find it a bit strange having to add _more_ code, as the core code handles
> registering child devices fine. Doing it from my bus driver only protects
> against people trying to run a kernel without my bus driver included
> (which currently works fine, as long as no PM domain or clock is involved,
>  e.g. if the clock is forgotten in the SoC's .dtsi :-).

I actually rather like the simple bus driver in it's current form, where
the device and pm-domain registration is taken care of by the
core. Since it's really not HW specific at all, maybe just rename it
simple-pm-bus or something like that?

Kevin


WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Ulrich Hecht <ulrich.hecht+renesas@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Grant Likely <grant.likely@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"devicetree\@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC 0/3] Add "Simple" / Renesas Bus State Controller Driver
Date: Wed, 26 Nov 2014 12:11:12 -0800	[thread overview]
Message-ID: <7h4mtlen8f.fsf@deeprootsystems.com> (raw)
In-Reply-To: <CAMuHMdVjpL-QgS0aAdMo4EHXibhpKCJC73yY+HDY=+Ae=LMigA@mail.gmail.com> (Geert Uytterhoeven's message of "Mon, 24 Nov 2014 21:27:06 +0100")

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> Hi Arnd,
>
> On Mon, Nov 24, 2014 at 9:15 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Monday 24 November 2014 21:10:05 Geert Uytterhoeven wrote:
>>> As this minimal BSC driver isn't hardware-specific at all, I'm wondering
>>> if there's a simpler way to do this?
>>>   - Should the driver be renamed to "simple-bus", and match "simple-bus"?
>>>   - Should this be moved to core code, without an explicit driver for
>>>     "simple-bus"? I.e. should the driver core just enable runtime PM for
>>>     all devices not bound to a driver, as they may represent buses with
>>>     child devices that do rely on runtime PM?
>>>
>>> Thanks for your comments and suggestions!
>>
>> My understanding of simple-bus is that it's something that does
>> not have any power-management capabilities, and I'd rather not
>> add clocks or interrupts to it.
>
> OK.
>
>> What I think makes more sense is to have a bus driver for it
>> in drivers/bus, remove the "simple-bus" compatibility value
>> and have the driver take care of registering the power domain
>> and probing the child devices using of_platform_populate on
>> itself.
>
> Registering power domains is already handled by the core code.
>
> So compared to my RFC code, I only have to
>   1. Drop "simple-bus" from the compatible property in the .dtsi,
>   2. Call of_platform_populate() from renesas_bsc_probe(), to
>      register the child devices, now the core code no longer does that.
>
> I find it a bit strange having to add _more_ code, as the core code handles
> registering child devices fine. Doing it from my bus driver only protects
> against people trying to run a kernel without my bus driver included
> (which currently works fine, as long as no PM domain or clock is involved,
>  e.g. if the clock is forgotten in the SoC's .dtsi :-).

I actually rather like the simple bus driver in it's current form, where
the device and pm-domain registration is taken care of by the
core. Since it's really not HW specific at all, maybe just rename it
simple-pm-bus or something like that?

Kevin


WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Ulrich Hecht <ulrich.hecht+renesas@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Grant Likely <grant.likely@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC 0/3] Add "Simple" / Renesas Bus State Controller Driver
Date: Wed, 26 Nov 2014 12:11:12 -0800	[thread overview]
Message-ID: <7h4mtlen8f.fsf@deeprootsystems.com> (raw)
In-Reply-To: <CAMuHMdVjpL-QgS0aAdMo4EHXibhpKCJC73yY+HDY=+Ae=LMigA@mail.gmail.com> (Geert Uytterhoeven's message of "Mon, 24 Nov 2014 21:27:06 +0100")

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> Hi Arnd,
>
> On Mon, Nov 24, 2014 at 9:15 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Monday 24 November 2014 21:10:05 Geert Uytterhoeven wrote:
>>> As this minimal BSC driver isn't hardware-specific at all, I'm wondering
>>> if there's a simpler way to do this?
>>>   - Should the driver be renamed to "simple-bus", and match "simple-bus"?
>>>   - Should this be moved to core code, without an explicit driver for
>>>     "simple-bus"? I.e. should the driver core just enable runtime PM for
>>>     all devices not bound to a driver, as they may represent buses with
>>>     child devices that do rely on runtime PM?
>>>
>>> Thanks for your comments and suggestions!
>>
>> My understanding of simple-bus is that it's something that does
>> not have any power-management capabilities, and I'd rather not
>> add clocks or interrupts to it.
>
> OK.
>
>> What I think makes more sense is to have a bus driver for it
>> in drivers/bus, remove the "simple-bus" compatibility value
>> and have the driver take care of registering the power domain
>> and probing the child devices using of_platform_populate on
>> itself.
>
> Registering power domains is already handled by the core code.
>
> So compared to my RFC code, I only have to
>   1. Drop "simple-bus" from the compatible property in the .dtsi,
>   2. Call of_platform_populate() from renesas_bsc_probe(), to
>      register the child devices, now the core code no longer does that.
>
> I find it a bit strange having to add _more_ code, as the core code handles
> registering child devices fine. Doing it from my bus driver only protects
> against people trying to run a kernel without my bus driver included
> (which currently works fine, as long as no PM domain or clock is involved,
>  e.g. if the clock is forgotten in the SoC's .dtsi :-).

I actually rather like the simple bus driver in it's current form, where
the device and pm-domain registration is taken care of by the
core. Since it's really not HW specific at all, maybe just rename it
simple-pm-bus or something like that?

Kevin


  reply	other threads:[~2014-11-26 20:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24 20:10 [PATCH RFC 0/3] Add "Simple" / Renesas Bus State Controller Driver Geert Uytterhoeven
2014-11-24 20:10 ` Geert Uytterhoeven
2014-11-24 20:10 ` [PATCH/RFC 1/3] ARM: shmobile: sh73a0 dtsi: Add Bus State Controller node Geert Uytterhoeven
2014-11-24 20:10   ` Geert Uytterhoeven
2014-11-24 20:10 ` [PATCH/RFC 2/3] ARM: shmobile: kzm9g-reference dts: Move Ethernet node to BSC Geert Uytterhoeven
2014-11-24 20:10   ` Geert Uytterhoeven
2014-11-24 21:11   ` Sergei Shtylyov
2014-11-24 21:11     ` Sergei Shtylyov
2014-11-24 21:43     ` Geert Uytterhoeven
2014-11-24 21:43       ` Geert Uytterhoeven
2014-11-24 20:10 ` [PATCH/RFC 3/3] drivers: bus: Add Renesas Bus State Controller Driver Geert Uytterhoeven
2014-11-24 20:10   ` Geert Uytterhoeven
2014-11-24 20:15 ` [PATCH RFC 0/3] Add "Simple" / " Arnd Bergmann
2014-11-24 20:15   ` Arnd Bergmann
2014-11-24 20:27   ` Geert Uytterhoeven
2014-11-24 20:27     ` Geert Uytterhoeven
2014-11-26 20:11     ` Kevin Hilman [this message]
2014-11-26 20:11       ` Kevin Hilman
2014-11-26 20:11       ` Kevin Hilman
2014-12-03  9:30       ` Geert Uytterhoeven
2014-12-03  9:30         ` Geert Uytterhoeven
2014-12-03 19:30         ` Kevin Hilman
2014-12-03 19:30           ` Kevin Hilman
2014-12-03 19:30           ` Kevin Hilman

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=7h4mtlen8f.fsf@deeprootsystems.com \
    --to=khilman@kernel.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=horms@verge.net.au \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.org \
    --cc=ulrich.hecht+renesas@gmail.com \
    /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.