linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Alex Courbot <acourbot@nvidia.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Stephen Warren <swarren@nvidia.com>,
	Arnd Bergmann <arnd@arndb.de>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"devicetree-discuss@lists.ozlabs.org" 
	<devicetree-discuss@lists.ozlabs.org>,
	Thierry Reding <thierry.reding@avionic-design.de>,
	Mark Zhang <markz@nvidia.com>,
	Rob Herring <rob.herring@calxeda.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Anton Vorontsov <cbouatmailru@gmail.com>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	David Woodhouse <dwmw2@infradead.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCHv9 1/3] Runtime Interpreted Power Sequences
Date: Thu, 22 Nov 2012 13:01:47 +0000	[thread overview]
Message-ID: <CACxGe6tLq7LAb_YwvJVnccJEJNEwKt6heEZER3L7tP1g1WnbXg@mail.gmail.com> (raw)
In-Reply-To: <4275468.QAmZy3xUK6@percival>

On Wed, Nov 21, 2012 at 10:00 AM, Alex Courbot <acourbot@nvidia.com> wrote:
> On Wednesday 21 November 2012 16:48:45 Tomi Valkeinen wrote:
>> If the power-off sequence disables a regulator that was supposed to be
>> enabled by the power-on sequence (but wasn't enabled because of an
>> error), the regulator_disable is still called when the driver runs the
>> power-off sequence, isn't it? Regulator enables and disables are ref
>> counted, and the enables should match the disables.
>
> And there collapses my theory.
>
>> > Failures might be better handled if sequences have some "recovery policy"
>> > about what to do when they fail, as mentioned in the link above. As you
>> > pointed out, the driver might not always know enough about the resources
>> > involved to do the right thing.
>>
>> Yes, I think such recovery policy would be needed.
>
> Indeed, from your last paragraph this makes even more sense now.
>
> Oh, and I noticed I forgot to reply to this:
>
>> This I didn't understand. Doesn't "<&pwm 2 xyz>" point to a single
>> device, no matter where and how many times it's used?
>
> That's true - however when dereferencing the phandle, the underlying framework
> will try to acquire the PWM, which will result in failure if the same resource
> is referenced several times.
>
> One could compare the phandles to avoid this, but in your example you must
> know that for PWMs the "xyz" part is not relevant for comparison.
>
> This makes referencing of resources by name much easier to implement and more
> elegant with respect to frameworks leveraging.

I would rather (at least for how the DT bindings settle out) see the
design separate the resource references from the sequence. ie. Declare
which resources are used by a device's sequences all in one place and
have the commands index into that.

g.

  reply	other threads:[~2012-11-22 18:38 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-17 10:55 [PATCHv9 0/3] Runtime Interpreted Power Sequences Alexandre Courbot
2012-11-17 10:55 ` [PATCHv9 1/3] " Alexandre Courbot
2012-11-17 11:38   ` Anton Vorontsov
2012-11-19  2:29     ` Alex Courbot
2012-11-19  2:32       ` Anton Vorontsov
2012-11-20 14:48   ` Tomi Valkeinen
2012-11-21  1:56     ` Alex Courbot
2012-11-21  8:13       ` Tomi Valkeinen
2012-11-21  8:32         ` Alex Courbot
2012-11-21  8:48           ` Tomi Valkeinen
2012-11-21 10:00             ` Alex Courbot
2012-11-22 13:01               ` Grant Likely [this message]
2012-11-20 21:54   ` Grant Likely
2012-11-21  1:31     ` Mark Brown
2012-11-21 16:44       ` Grant Likely
2012-11-22  8:57       ` Linus Walleij
2012-11-22  9:55         ` Alexandre Courbot
2012-11-23  1:44         ` Mark Brown
2012-11-21  4:23     ` Alex Courbot
2012-11-21 11:06       ` Tomi Valkeinen
2012-11-21 11:40         ` Thierry Reding
2012-11-21 12:04           ` Tomi Valkeinen
2012-11-21 13:00             ` Thierry Reding
2012-11-21 13:32               ` Tomi Valkeinen
2012-11-21 15:02                 ` Alexandre Courbot
2012-11-21 15:12                   ` Thierry Reding
2012-11-22  2:01                     ` Alexandre Courbot
2012-11-22  2:06                       ` Mark Brown
2012-11-22  3:09                         ` Alexandre Courbot
2012-11-22 13:39                     ` Grant Likely
2012-11-27 15:19               ` Laurent Pinchart
2012-11-27 15:08             ` Laurent Pinchart
2012-11-27 15:19               ` Tomi Valkeinen
2012-11-27 15:37                 ` Laurent Pinchart
2012-11-27 16:46                   ` Mark Brown
2012-11-27 14:47           ` Laurent Pinchart
2012-11-22 13:39       ` Grant Likely
2012-11-22 21:40         ` Thierry Reding
2012-11-26 11:49           ` Alex Courbot
2012-11-26 15:34           ` Grant Likely
2012-11-17 10:55 ` [PATCHv9 2/3] pwm_backlight: use power sequences Alexandre Courbot
2012-11-17 10:55 ` [PATCHv9 3/3] Take maintainership of " Alexandre Courbot
2012-11-20 21:58 ` [PATCHv9 0/3] Runtime Interpreted Power Sequences Grant Likely

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=CACxGe6tLq7LAb_YwvJVnccJEJNEwKt6heEZER3L7tP1g1WnbXg@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=acourbot@nvidia.com \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=cbouatmailru@gmail.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dwmw2@infradead.org \
    --cc=gnurou@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=markz@nvidia.com \
    --cc=rob.herring@calxeda.com \
    --cc=swarren@nvidia.com \
    --cc=thierry.reding@avionic-design.de \
    --cc=tomi.valkeinen@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).