All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] ARM: shmobile: compile drivers/sh for CONFIG_ARCH_SHMOBILE_MULTI
Date: Mon, 20 Jan 2014 11:47:05 +0000	[thread overview]
Message-ID: <20140120114705.GL17314@sirena.org.uk> (raw)
In-Reply-To: <1389367095-7760-1-git-send-email-ben.dooks@codethink.co.uk>

[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]

On Sun, Jan 19, 2014 at 10:44:53PM +0100, Laurent Pinchart wrote:
> On Thursday 16 January 2014 17:25:09 Ben Dooks wrote:

> > I was having a think, and how about adding the following to each
> > driver that expects clock management to happen for it, such as the
> > following in the probe sequence:

> > 	pm_runtime_manage_clock(dev);

> > This would mean the following:

> > - People would know a driver had its clock managed elsewhere
> > - You couldn't build a system with the clock_ops disabled.
> > - A system where a mix of drivers where used would work fine
> > - drivers/sh/pm_runtime.c could be deleted too.

> That sounds like a good idea to me. I like how drivers will be responsible for 
> explicitly delegating clock handling to generic code. This combines simplicity 
> with flexibility, and doesn't hide clock handling.

> Mark, Rafael, any opinion ?

I think that just makes things more complicated and isn't adding
anything over pm_runtime_enable(), it's just boilerplate code.  In
theory essentially every driver running on platforms which don't have
explicit management of core IP clocks ought to be calling this since
potentially the IP might be deployed on another platform which does have
clock management (this does actually happen with things like the
DesignWare IPs) and it doesn't do anything like say which clocks are
expected to be managed in this way which is another thing that can come
up when moving devices between platforms.

I'm also struggling to see how it provides any sort of build time
protection, it would allow the generation of a warning at runtime at
best.

As far as I can tell the problem that Ben has seen here is that the
platform really, really needs the code for its power domains running to
be functional (this doesn't seem unreasonable and may not be related to
clocks, this may be required to have the IPs powered up at all).  I'd
expect this is something for the platform to sort out rather than
something for individual drivers to have to carry code for.

If it was going to be drivers carrying code for this I would expect it
to be something like providing a list of clocks to be managed along with
runtime PM - this would also make the code more widely applicable since
it's quite common for the runtime PM callbacks to do nothing more than
just enable and disable clocks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2014-01-20 11:47 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-10 15:18 [PATCH] ARM: shmobile: compile drivers/sh for CONFIG_ARCH_SHMOBILE_MULTI Ben Dooks
2014-01-11 13:06 ` Ben Dooks
2014-01-11 13:06   ` Ben Dooks
2014-01-12 21:54   ` Laurent Pinchart
2014-01-12 21:54     ` Laurent Pinchart
2014-01-12 22:01     ` Laurent Pinchart
2014-01-12 22:01       ` Laurent Pinchart
2014-01-13  6:45       ` Ben Dooks
2014-01-13 22:37         ` Laurent Pinchart
2014-01-13 22:37           ` Laurent Pinchart
2014-01-17  0:49         ` Mark Brown
2014-01-13  0:30 ` Simon Horman
2014-01-13  0:30   ` Simon Horman
2014-01-13  6:23   ` Ben Dooks
2014-01-13  9:28 ` Geert Uytterhoeven
2014-01-13  9:28   ` Geert Uytterhoeven
2014-01-13  9:35   ` Ben Dooks
2014-01-13  9:47     ` Geert Uytterhoeven
2014-01-13  9:47       ` Geert Uytterhoeven
2014-01-14 13:56 ` Ben Dooks
2014-01-14 23:55 ` Simon Horman
2014-01-15 19:46 ` Laurent Pinchart
2014-01-16 10:38 ` Ben Dooks
2014-01-16 17:25 ` Ben Dooks
2014-01-19 21:44 ` Laurent Pinchart
2014-01-20 11:47 ` Mark Brown [this message]
2014-01-20 12:01 ` Ben Dooks
2014-01-20 12:54 ` Mark Brown
2014-01-20 13:19   ` Ben Dooks
2014-01-20 13:19     ` Ben Dooks
2014-01-20 15:48     ` Laurent Pinchart
2014-01-20 15:48       ` Laurent Pinchart
2014-01-20 15:56       ` Mark Brown
2014-01-20 15:56         ` Mark Brown
2014-01-20 22:52         ` Laurent Pinchart
2014-01-20 22:52           ` Laurent Pinchart
2014-03-11 19:15           ` Geert Uytterhoeven
2014-03-11 19:15             ` Geert Uytterhoeven
2014-03-12 14:18             ` Laurent Pinchart
2014-03-12 14:18               ` Laurent Pinchart
2014-03-12 15:28               ` Laurent Pinchart
2014-03-12 15:28                 ` Laurent Pinchart

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=20140120114705.GL17314@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=linux-sh@vger.kernel.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.