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]
Date:   Tue, 21 Jun 2022 15:39:40 +0200
From:   Pierre Yves MORDRET <pierre-yves.mordret@...s.st.com>
To:     Alain Volmat <alain.volmat@...s.st.com>, <wsa@...nel.org>,
        <robh+dt@...nel.org>
CC:     <mark.rutland@....com>, <mcoquelin.stm32@...il.com>,
        <alexandre.torgue@...s.st.com>, <linux-i2c@...r.kernel.org>,
        <devicetree@...r.kernel.org>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <fabrice.gasnier@...s.st.com>,
        <amelie.delaunay@...s.st.com>
Subject: Re: [PATCH 2/4] i2c: stm32: only perform a reset if there is a reset
 property

Hi All

Look good to me.

Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@...s.st.com>

Regards

On 6/20/22 12:54, Alain Volmat wrote:
> Allow the driver to properly initialize even if there is no reset
> property given.  In such case reset control is not done and
> initialization proceed.
> 
> Signed-off-by: Alain Volmat <alain.volmat@...s.st.com>
> ---
>  drivers/i2c/busses/i2c-stm32f7.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
> index 6d4aa64b195d..b29d8e476342 100644
> --- a/drivers/i2c/busses/i2c-stm32f7.c
> +++ b/drivers/i2c/busses/i2c-stm32f7.c
> @@ -2138,13 +2138,14 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
>  
>  	rst = devm_reset_control_get(&pdev->dev, NULL);
>  	if (IS_ERR(rst)) {
> -		ret = dev_err_probe(&pdev->dev, PTR_ERR(rst),
> -				    "Error: Missing reset ctrl\n");
> -		goto clk_free;
> +		ret = PTR_ERR(rst);
> +		if (ret == -EPROBE_DEFER)
> +			goto clk_free;
> +	} else {
> +		reset_control_assert(rst);
> +		udelay(2);
> +		reset_control_deassert(rst);
>  	}
> -	reset_control_assert(rst);
> -	udelay(2);
> -	reset_control_deassert(rst);
>  
>  	i2c_dev->dev = &pdev->dev;
>  

-- 
--
~ Py MORDRET
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ