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: <ee5798e5-bcc4-4715-9c93-913094160b97@sirena.org.uk>
Date: Wed, 29 May 2024 14:15:18 +0100
From: Mark Brown <broonie@...nel.org>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Liam Girdwood <lgirdwood@...il.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	devicetree@...r.kernel.org, linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] regulator: gpio: Correct default GPIO state to LOW

On Wed, May 29, 2024 at 11:49:51AM +0200, Geert Uytterhoeven wrote:
> According to the GPIO regulator DT bindings[1], the default GPIO state
> is LOW.  However, the driver defaults to HIGH.

> Before the conversion to descriptors in commit d6cd33ad71029a3f
> ("regulator: gpio: Convert to use descriptors"), the default state used
> by the driver was rather ill-defined, too:

That was 4 years ago...

> I have no idea if this has any impact.
> I guess most/all DTS files have proper gpios-states properties?

That seems optimistic, and a grep in mainline shows some users but not
really as many as I'd intuitively expect.

> -			/* Default to high per specification */
> +			/* Default to low per specification */
>  			if (ret)
> -				config->gflags[i] = GPIOD_OUT_HIGH;
> +				config->gflags[i] = GPIOD_OUT_LOW;
>  			else

The risk here is that we start glitching the power where previously we
didn't.  This does make me nervous.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ