lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTim5Qw_PQJ234YsNvvmsg7L-RGfTsuMaTHvUmLHK@mail.gmail.com>
Date:	Thu, 10 Mar 2011 16:43:50 +0100
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Linus Walleij <linus.walleij@...ricsson.com>,
	Liam Girdwood <lrg@...mlogic.co.uk>,
	linux-kernel@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
	Bengt Jonsson <bengt.g.jonsson@...ricsson.com>
Subject: Re: [PATCH 2/4] regulator: add ab8500 per-regulator startup delay

On Thu, Mar 10, 2011 at 2:49 PM, Mark Brown
<broonie@...nsource.wolfsonmicro.com> wrote:
> On Thu, Mar 10, 2011 at 02:43:41PM +0100, Linus Walleij wrote:
>> From: Bengt Jonsson <bengt.g.jonsson@...ricsson.com>
>>
>> Since some regulators can take some time to come online, we
>> define a per-regulator millisecond delay value and assign
>> to the slow TV-out regulator.
>
> You should be implementing the enable_time() operation for the regulator
> for this.

I looked into it, but the core implicitly only does delays after
enable(), and our delays affect disable() and set_voltage()
as well. disable() may look superfluous but I bet there may be
cases where not having a voltage fully disabled before doing
something will cause immesurable harm.

I was thinking about extending the present mechanism in
core by refactoring the signature of the enable_time()
as such:

/* Operations that we want to enumerate to the enable_time() call */
enum regulator_op {
     REGULATOR_ENABLE,
     REGULATOR_DISABLE,
     REGULATOR_SET_VOLTAGE,
     REGULATOR_SET_MODE,
};

/* Time taken to enable the regulator */
int (*enable_time) (struct regulator_dev *, enum regulator_op op);

Then I'll have to break out the delay code and refactor a bit,
altering the few drivers using it I guess.

Sounds like a plan?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ