public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
To: Laxman Dewangan <ldewangan.com-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: lrg-l0cyMroinI0@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH] regulator: Rail is said to be enable only if this and supply rails are enabled.
Date: Tue, 3 Jan 2012 20:16:24 +0000	[thread overview]
Message-ID: <20120103201624.GC2843@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1325570983-3700-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On Tue, Jan 03, 2012 at 11:39:43AM +0530, Laxman Dewangan wrote:
> From: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> 
> The given rail is said to be enabled only if this rail is eanbled
> along with supply rail.
> Adding check for the supply rail whether it is enabled or not when
> query about rail enabled.

This feels wrong - the code in general assumes that the parents will all
be enabled for an enabled child (and does the required stuff on enable
and disable).  Doing the check isn't unreasonable but if it fails we
really ought to be complaining loudly as we're probably confused and
things might be going wrong elsewhere.

We should also look at the bootstrapping code, we're not really making
much effort to verify that the hardware configuration on boot is sane
(though realistically it's unlikely that it won't be).

> Signed-off-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> When consumer of any rails query about whether rail is enabled
> or not, the function regulator_is_enabled() should return enabled
> only if this rail and supply rail (both) are enabled.
> if any one of rail, whether the given rail or supply rail, is enabled
> then function should return as not enabled.

Please just put things in the changelog if they're useful.

  parent reply	other threads:[~2012-01-03 20:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03  6:09 [PATCH] regulator: Rail is said to be enable only if this and supply rails are enabled Laxman Dewangan
     [not found] ` <1325570983-3700-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-01-03 20:16   ` Mark Brown [this message]
     [not found]     ` <20120103201624.GC2843-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-01-04  6:19       ` Laxman Dewangan
     [not found]         ` <96C9D994977DD0439FB6D3FE3B13DD907DBD3A9C2E-kdsAE/FnitNDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-01-05  6:06           ` Mark Brown
     [not found]             ` <20120105060646.GG11867-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-01-05 14:12               ` Laxman Dewangan

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=20120103201624.GC2843@opensource.wolfsonmicro.com \
    --to=broonie-yzvpicuk2aatku/dhu1wvuem+bqzidxxqq4iyu8u01e@public.gmane.org \
    --cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=ldewangan.com-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lrg-l0cyMroinI0@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox