From: Pierre Yves MORDRET <pierre-yves.mordret@foss.st.com>
To: Alain Volmat <alain.volmat@foss.st.com>, <wsa@kernel.org>,
<robh+dt@kernel.org>
Cc: <mark.rutland@arm.com>, <mcoquelin.stm32@gmail.com>,
<alexandre.torgue@foss.st.com>, <linux-i2c@vger.kernel.org>,
<devicetree@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <fabrice.gasnier@foss.st.com>,
<amelie.delaunay@foss.st.com>
Subject: Re: [PATCH 2/4] i2c: stm32: only perform a reset if there is a reset property
Date: Tue, 21 Jun 2022 15:39:40 +0200 [thread overview]
Message-ID: <18c0e9c9-f0c9-7458-8287-e52f63247c16@foss.st.com> (raw)
In-Reply-To: <20220620105405.145959-3-alain.volmat@foss.st.com>
Hi All
Look good to me.
Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@foss.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@foss.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
--
next prev parent reply other threads:[~2022-06-21 13:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 10:54 [PATCH 0/4] i2c: stm32: addition of STM32MP13 support Alain Volmat
2022-06-20 10:54 ` [PATCH 1/4] dt-bindings: i2c: st,stm32-i2c: don't mandate a reset line Alain Volmat
2022-06-28 13:41 ` Rob Herring
2022-06-29 19:44 ` Wolfram Sang
2022-07-06 22:46 ` Rob Herring
2022-07-07 6:38 ` Alain Volmat
2022-06-20 10:54 ` [PATCH 2/4] i2c: stm32: only perform a reset if there is a reset property Alain Volmat
2022-06-21 13:39 ` Pierre Yves MORDRET [this message]
2022-06-20 10:54 ` [PATCH 3/4] dt-bindings: i2c: st,stm32-i2c: add entry for stm32mp13 Alain Volmat
2022-06-20 10:54 ` [PATCH 4/4] i2c: stm32: add support for the STM32MP13 soc Alain Volmat
2022-06-21 13:40 ` Pierre Yves MORDRET
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18c0e9c9-f0c9-7458-8287-e52f63247c16@foss.st.com \
--to=pierre-yves.mordret@foss.st.com \
--cc=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=devicetree@vger.kernel.org \
--cc=fabrice.gasnier@foss.st.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=robh+dt@kernel.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).