All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: Mark Brown <broonie@kernel.org>
Cc: lgirdwood@gmail.com, m.purski@samsung.com, p.paillet@st.com,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] regulator: core: fix _regulator_do_disable return value
Date: Fri, 13 Jul 2018 17:48:54 +0200	[thread overview]
Message-ID: <20180713154854.qmnraejcdq6gqn3x@pengutronix.de> (raw)
In-Reply-To: <20180713130715.GC16228@sirena.org.uk>

Hi Mark,

tanks for the feedback.

On 18-07-13 14:07, Mark Brown wrote:
> On Fri, Jul 13, 2018 at 02:56:24PM +0200, Marco Felsch wrote:
> 
> > Currently _regulator_do_disable returns 0 if either the ena_pin nor the
> > ops.disbale() isn't present. This assumes that the call was successful
> > but it wasn't because disbaling isn't supported at all.
> 
> > The last case of the if-chain should return -EINVAL, because disabling
> > isn't supported by the driver as it is done already by
> > _regulator_do_enable.
> 
> This is fine - consumers shouldn't expect that a disable will cause
> anything to actually get powered off, constraints or other consumers
> might mean that the disable doesn't actually happen.  It's just the same
> as a consumer with an always on flag.

Okay, I understand that the behaviour should be like the always-on
contrain. But now the behaviour of the core is like my v1 of
"Re-Enable support to disable switch regulators". It's like a 'simulated
off', which wasn't a good solution for you. The difference is, that the
'simulated off' is now made in the core.

Regards,
Marco

  reply	other threads:[~2018-07-13 15:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-13 12:56 [PATCH] regulator: core: fix _regulator_do_disable return value Marco Felsch
2018-07-13 13:07 ` Mark Brown
2018-07-13 15:48   ` Marco Felsch [this message]
2018-07-13 16:15     ` Mark Brown

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=20180713154854.qmnraejcdq6gqn3x@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=broonie@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.purski@samsung.com \
    --cc=p.paillet@st.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.