All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
To: Alain Volmat <alain.volmat@foss.st.com>,
	<uboot-stm32@st-md-mailman.stormreply.com>,
	<u-boot@lists.denx.de>
Cc: <patrice.chotard@foss.st.com>, <jorge@foundries.io>, <hs@denx.de>,
	<oleksandr.suvorov@foundries.io>
Subject: Re: [PATCH v2 2/3] i2c: stm32: remove unused stop parameter in start & reload handling
Date: Thu, 8 Sep 2022 14:50:11 +0200	[thread overview]
Message-ID: <713dcf62-706b-8a9c-6893-e1b2d71cd1af@foss.st.com> (raw)
In-Reply-To: <20220908105934.1764482-3-alain.volmat@foss.st.com>

Hi,

On 9/8/22 12:59, Alain Volmat wrote:
> Functions stm32_i2c_message_start and stm32_i2c_handle_reload
> both get a stop boolean indicating if the transfer should end with
> a STOP or not.  However no specific handling is needed in those
> functions hence remove the parameter.
>
> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> ---
>   drivers/i2c/stm32f7_i2c.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
> index 78d7156492..0ec67b5c12 100644
> --- a/drivers/i2c/stm32f7_i2c.c
> +++ b/drivers/i2c/stm32f7_i2c.c
> @@ -282,7 +282,7 @@ static int stm32_i2c_check_device_busy(struct stm32_i2c_priv *i2c_priv)
>   }
>   
>   static void stm32_i2c_message_start(struct stm32_i2c_priv *i2c_priv,
> -				    struct i2c_msg *msg, bool stop)
> +				    struct i2c_msg *msg)
>   {
>   	struct stm32_i2c_regs *regs = i2c_priv->regs;
>   	u32 cr2 = readl(&regs->cr2);
> @@ -325,7 +325,7 @@ static void stm32_i2c_message_start(struct stm32_i2c_priv *i2c_priv,
>    */
>   
>   static void stm32_i2c_handle_reload(struct stm32_i2c_priv *i2c_priv,
> -				    struct i2c_msg *msg, bool stop)
> +				    struct i2c_msg *msg)
>   {
>   	struct stm32_i2c_regs *regs = i2c_priv->regs;
>   	u32 cr2 = readl(&regs->cr2);
> @@ -431,7 +431,7 @@ static int stm32_i2c_message_xfer(struct stm32_i2c_priv *i2c_priv,
>   	/* Add errors */
>   	mask |= STM32_I2C_ISR_ERRORS;
>   
> -	stm32_i2c_message_start(i2c_priv, msg, stop);
> +	stm32_i2c_message_start(i2c_priv, msg);
>   
>   	while (msg->len) {
>   		/*
> @@ -469,7 +469,7 @@ static int stm32_i2c_message_xfer(struct stm32_i2c_priv *i2c_priv,
>   			mask = msg->flags & I2C_M_RD ? STM32_I2C_ISR_RXNE :
>   			       STM32_I2C_ISR_TXIS | STM32_I2C_ISR_NACKF;
>   
> -			stm32_i2c_handle_reload(i2c_priv, msg, stop);
> +			stm32_i2c_handle_reload(i2c_priv, msg);
>   		} else if (!bytes_to_rw) {
>   			/* Wait until TC flag is set */
>   			mask = STM32_I2C_ISR_TC;


Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick


  reply	other threads:[~2022-09-08 12:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 10:59 [PATCH v2 0/3] i2c: stm32: cleanup & stop handling fix Alain Volmat
2022-09-08 10:59 ` [PATCH v2 1/3] i2c: stm32: fix comment and remove unused AUTOEND bit Alain Volmat
2022-09-08 12:50   ` Patrick DELAUNAY
2022-09-08 10:59 ` [PATCH v2 2/3] i2c: stm32: remove unused stop parameter in start & reload handling Alain Volmat
2022-09-08 12:50   ` Patrick DELAUNAY [this message]
2022-09-08 10:59 ` [PATCH v2 3/3] i2c: stm32: only send a STOP upon transfer completion Alain Volmat
2022-09-08 12:50   ` Patrick DELAUNAY
2022-09-09  8:30     ` Jorge Ramirez-Ortiz, Foundries
2022-09-09  8:43       ` Heiko Schocher
2022-09-09 11:53         ` Patrick DELAUNAY
2022-09-09 12:53   ` Patrick DELAUNAY
2022-09-09 15:17     ` Alain Volmat
2022-09-11 18:57       ` Jorge Ramirez-Ortiz, Foundries
2022-09-12  8:36         ` Alain Volmat

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=713dcf62-706b-8a9c-6893-e1b2d71cd1af@foss.st.com \
    --to=patrick.delaunay@foss.st.com \
    --cc=alain.volmat@foss.st.com \
    --cc=hs@denx.de \
    --cc=jorge@foundries.io \
    --cc=oleksandr.suvorov@foundries.io \
    --cc=patrice.chotard@foss.st.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.