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: <09f2076f-352f-cac2-030f-9f29a0add47e@ti.com>
Date:   Wed, 22 Jul 2020 13:50:09 -0500
From:   Dan Murphy <dmurphy@...com>
To:     <lgirdwood@...il.com>, <broonie@...nel.org>, <perex@...ex.cz>,
        <tiwai@...e.com>, <robh@...nel.org>
CC:     <devicetree@...r.kernel.org>, <alsa-devel@...a-project.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] ASoC: tas2562: Update shutdown GPIO property

Hello

On 7/22/20 10:47 AM, Dan Murphy wrote:
> Update the shutdown GPIO property to be shutdown from shut-down.
>
> Fixes: c173dba44c2d2 ("ASoC: tas2562: Introduce the TAS2562 amplifier")
> Signed-off-by: Dan Murphy <dmurphy@...com>
> ---
>
> v2 - Set sdz_gpio to NULL if gpio property not present.
>
>   sound/soc/codecs/tas2562.c | 21 +++++++++++++++++----
>   1 file changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c
> index e74628061040..8a53633a3853 100644
> --- a/sound/soc/codecs/tas2562.c
> +++ b/sound/soc/codecs/tas2562.c
> @@ -680,12 +680,25 @@ static int tas2562_parse_dt(struct tas2562_data *tas2562)
>   	struct device *dev = tas2562->dev;
>   	int ret = 0;
>   
> -	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shut-down",
> -						    GPIOD_OUT_HIGH);
> +	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shutdown",
> +						      GPIOD_OUT_HIGH);
>   	if (IS_ERR(tas2562->sdz_gpio)) {
> -		if (PTR_ERR(tas2562->sdz_gpio) == -EPROBE_DEFER) {
> -			tas2562->sdz_gpio = NULL;
> +		tas2562->sdz_gpio = NULL;

This is incorrect.  We will never see EPROBE_DEFER since we cleared out 
the gpio.  I need to revert this.

Same for below.

> +		if (PTR_ERR(tas2562->sdz_gpio) == -EPROBE_DEFER)
>   			return -EPROBE_DEFER;
> +	}
> +
> +	/*
> +	 * The shut-down property is deprecated but needs to be checked for
> +	 * backwards compatibility.
> +	 */
> +	if (tas2562->sdz_gpio == NULL) {
> +		tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shut-down",
> +							      GPIOD_OUT_HIGH);
> +		if (IS_ERR(tas2562->sdz_gpio)) {
> +			tas2562->sdz_gpio = NULL;

Same comment as above

Dan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ