[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180713154854.qmnraejcdq6gqn3x@pengutronix.de>
Date: Fri, 13 Jul 2018 17:48:54 +0200
From: Marco Felsch <m.felsch@...gutronix.de>
To: Mark Brown <broonie@...nel.org>
Cc: lgirdwood@...il.com, m.purski@...sung.com, p.paillet@...com,
linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH] regulator: core: fix _regulator_do_disable return value
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
Powered by blists - more mailing lists