All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alain Volmat <alain.volmat@foss.st.com>
To: <uboot-stm32@st-md-mailman.stormreply.com>, <u-boot@lists.denx.de>
Cc: <patrice.chotard@foss.st.com>, <patrick.delaunay@foss.st.com>,
	<jorge@foundries.io>, <hs@denx.de>,
	<oleksandr.suvorov@foundries.io>
Subject: [PATCH v4 2/4] i2c: stm32: remove unused stop parameter in start & reload handling
Date: Mon, 12 Sep 2022 10:41:59 +0200	[thread overview]
Message-ID: <20220912084201.1826979-3-alain.volmat@foss.st.com> (raw)
In-Reply-To: <20220912084201.1826979-1-alain.volmat@foss.st.com>

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>
Reviewed-by: Patrick Delaunay <patrick.delaunay@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;
-- 
2.25.1


  parent reply	other threads:[~2022-09-12 12:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12  8:41 [PATCH v4 0/4] i2c: stm32: cleanup & stop handling fix Alain Volmat
2022-09-12  8:41 ` [PATCH v4 1/4] i2c: stm32: fix comment and remove unused AUTOEND bit Alain Volmat
2022-09-12  8:47   ` Heiko Schocher
2022-09-12  8:52   ` Patrice CHOTARD
2022-09-15 15:18   ` Patrick DELAUNAY
2022-09-12  8:41 ` Alain Volmat [this message]
2022-09-12  8:48   ` [PATCH v4 2/4] i2c: stm32: remove unused stop parameter in start & reload handling Heiko Schocher
2022-09-12  8:52   ` Patrice CHOTARD
2022-09-15 15:25   ` Patrick DELAUNAY
2022-09-12  8:42 ` [PATCH v4 3/4] i2c: stm32: do not set the STOP condition on error Alain Volmat
2022-09-12  8:52   ` Patrice CHOTARD
2022-09-12  9:02   ` Heiko Schocher
2022-09-12 12:03   ` Patrick DELAUNAY
2022-09-15 15:28   ` Patrick DELAUNAY
2022-09-15 15:30   ` Patrick DELAUNAY
2022-09-12  8:42 ` [PATCH v4 4/4] i2c: stm32: fix usage of rise/fall device tree properties Alain Volmat
2022-09-12  8:51   ` Patrice CHOTARD
2022-09-12  9:10   ` Heiko Schocher
2022-09-12 12:04   ` Patrick DELAUNAY
2022-09-15 15:48   ` Patrick DELAUNAY

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=20220912084201.1826979-3-alain.volmat@foss.st.com \
    --to=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=patrick.delaunay@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.