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: <aTqRXbdAaV++jdHZ@opensource.cirrus.com>
Date: Thu, 11 Dec 2025 09:39:41 +0000
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Brad Kelley <spambake@...dkelley.org>
Cc: david.rhodes@...rus.com, rf@...nsource.cirrus.com, lgirdwood@...il.com,
        broonie@...nel.org, perex@...ex.cz, tiwai@...e.com,
        linux-sound@...r.kernel.org, patches@...nsource.cirrus.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Correct a typo which inverted the reset GPIO pin
 sequence.

On Wed, Dec 10, 2025 at 09:16:28PM -0800, Brad Kelley wrote:
> commit that had typo: 42d1178d223ba9498c1ed40a5fc243a43d35ec97 ASoC: cs4271: Convert to GPIO descriptors
> 

This commit adds a GPIO_ACTIVE_LOW flag onto the GPIO lookups
which should cause the GPIO core to invert the sense of the
gpiod_set_value calls. Is your use-case using one of the in
kernel lookups or your own one? If it is your own one do you need
to add a GPIO_ACTIVE_LOW to that?

> The original commit changed a 1 to a 0 and a 0 to a 1. This inverted the reset sequence
> resulting in the IC powering down and not initializing.  Correcting that allows the board to initialized.
> 
> Signed-off-by: Brad Kelley <spambake@...dkelley.org>
> ---
>  sound/soc/codecs/cs4271.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
> index 77dfc83a3c01..348f15c36d10 100644
> --- a/sound/soc/codecs/cs4271.c
> +++ b/sound/soc/codecs/cs4271.c
> @@ -486,9 +486,9 @@ static int cs4271_reset(struct snd_soc_component *component)
>  {
>  	struct cs4271_private *cs4271 = snd_soc_component_get_drvdata(component);
>  
> -	gpiod_direction_output(cs4271->reset, 1);
> +	gpiod_direction_output(cs4271->reset, 0);

This does look like a bug however, the GPIO should clearly still be
an output. So keep this bit. Also could you change that commit in
the commit message to a Fixes tag:

Fixes: 42d1178d223b ("ASoC: cs4271: Convert to GPIO descriptors")

>  	mdelay(1);
> -	gpiod_set_value(cs4271->reset, 0);
> +	gpiod_set_value(cs4271->reset, 1);
>  	mdelay(1);
>  
>  	return 0;
> -- 
> 2.43.0
> 

Thanks,
Charles

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ