mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Marco Felsch <m.felsch@pengutronix.de>
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 14:07:15 +0100	[thread overview]
Message-ID: <20180713130715.GC16228@sirena.org.uk> (raw)
In-Reply-To: <20180713125624.13783-1-m.felsch@pengutronix.de>

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

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-13 12:56 Marco Felsch
2018-07-13 13:07 ` Mark Brown [this message]
2018-07-13 15:48   ` Marco Felsch
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=20180713130715.GC16228@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®