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: <aXI9KKlohbA1ySB0@smile.fi.intel.com>
Date: Thu, 22 Jan 2026 17:07:20 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: "Peng Fan (OSS)" <peng.fan@....nxp.com>
Cc: Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>, Linus Walleij <linusw@...nel.org>,
	Bartosz Golaszewski <brgl@...nel.org>,
	Daniel Mack <daniel@...que.org>,
	Haojian Zhuang <haojian.zhuang@...il.com>,
	Robert Jarzmik <robert.jarzmik@...e.fr>,
	linux-kernel@...r.kernel.org, linux-sound@...r.kernel.org,
	linux-gpio@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Peng Fan <peng.fan@....com>
Subject: Re: [PATCH 4/4] ASoC: ac97: Convert to GPIO descriptors

On Thu, Jan 22, 2026 at 08:45:00PM +0800, Peng Fan (OSS) wrote:

> of_gpio.h is deprecated, update the driver to use GPIO descriptors.
>  - Use devm_gpiod_get to get GPIO descriptor, and set consumer
>    name.
> 
> Since the driver still pass the reset_gpio to pxa27x_configure_ac97reset,
> so use desc_to_gpio() to get it gpio id.

GPIO

Why can't we convert that one to use GPIO descriptor to begin with?

...


>  	if (dev->dev.of_node) {
> -		reset_gpio = of_get_named_gpio(dev->dev.of_node, "reset-gpios", 0);
> -		if (reset_gpio == -ENOENT)
> +		/* Assert reset using GPIOD_OUT_HIGH, because reset is GPIO_ACTIVE_LOW */
> +		rst_gpio = devm_gpiod_get(&dev->dev, "reset", GPIOD_OUT_HIGH);
> +		ret = PTR_ERR(rst_gpio);
> +		if (ret == -ENOENT)
>  			reset_gpio = -1;
> -		else if (reset_gpio < 0)
> -			return reset_gpio;
> +		else if (ret)
> +			return ret;
> +		reset_gpio = desc_to_gpio(rst_gpio);

Also, have you considered moving towards 'reset-gpio' driver?

...

And last but not least Q, have you checked gpiolib-of.c if there is any quirks
regarding this case (might be some fixes related to polarity)?

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ