From: "Ali Köse" <shroot1337@gmail.com>
To: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com
Cc: gregkh@linuxfoundation.org, rppt@kernel.org,
linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] staging: sm750fb: Remove empty software I2C acknowledgement helper
Date: Sat, 14 Nov 2026 13:02:07 +0300 [thread overview]
Message-ID: <20261114100207.9124-4-shroot1337@gmail.com> (raw)
In-Reply-To: <20261114100207.9124-1-shroot1337@gmail.com>
sw_i2c_ack() contains only a return statement, so calling it has
no effect. Remove the empty helper and the ack parameter from
sw_i2c_read_byte(), along with the parameter documentation.
Update the only caller to use the parameterless helper. The GPIO
operations and existing I2C bus behavior remain unchanged.
Signed-off-by: Ali Köse <shroot1337@gmail.com>
---
drivers/staging/sm750fb/ddk750_swi2c.c | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_swi2c.c b/drivers/staging/sm750fb/ddk750_swi2c.c
index e63f3b00ec4c..54ce355e535f 100644
--- a/drivers/staging/sm750fb/ddk750_swi2c.c
+++ b/drivers/staging/sm750fb/ddk750_swi2c.c
@@ -201,14 +201,6 @@ static unsigned char sw_i2c_read_sda(void)
return 0;
}
-/*
- * This function sends ACK signal
- */
-static void sw_i2c_ack(void)
-{
- return; /* Single byte read is ok without it. */
-}
-
/*
* This function sends the start command to the slave device
*/
@@ -300,14 +292,10 @@ static long sw_i2c_write_byte(unsigned char data)
/*
* This function reads one byte from the slave device
*
- * Parameters:
- * ack - Flag to indicate either to send the acknowledge
- * message to the slave device or not
- *
* Return Value:
* One byte data read from the Slave device
*/
-static unsigned char sw_i2c_read_byte(unsigned char ack)
+static unsigned char sw_i2c_read_byte(void)
{
int i;
unsigned char data = 0;
@@ -326,9 +314,6 @@ static unsigned char sw_i2c_read_byte(unsigned char ack)
data |= (sw_i2c_read_sda() << i);
}
- if (ack)
- sw_i2c_ack();
-
/* Set the SCL Low and SDA High */
sw_i2c_scl(0);
sw_i2c_sda(1);
@@ -458,7 +443,7 @@ unsigned char sm750_sw_i2c_read_reg(unsigned char addr, unsigned char reg)
/* Get the bus again and get the data from the device read address */
sw_i2c_start();
sw_i2c_write_byte(addr + 1);
- data = sw_i2c_read_byte(1);
+ data = sw_i2c_read_byte();
/* Stop swI2C and release the bus */
sw_i2c_stop();
--
2.53.0
prev parent reply other threads:[~2026-11-14 10:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 10:02 [PATCH 0/3] staging: sm750fb: Clean up helpers and fix DAC power-off handling Ali Köse
2026-11-14 10:02 ` [PATCH 1/3] staging: sm750fb: Replace set_DAC macro with a static function Ali Köse
2026-11-14 10:02 ` [PATCH 2/3] staging: sm750fb: Fix DAC power-off bit handling Ali Köse
2026-11-14 10:02 ` Ali Köse [this message]
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=20261114100207.9124-4-shroot1337@gmail.com \
--to=shroot1337@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=rppt@kernel.org \
--cc=sudipm.mukherjee@gmail.com \
--cc=teddy.wang@siliconmotion.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.