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]
Message-ID: <20240322132619.6389-52-wsa+renesas@sang-engineering.com>
Date: Fri, 22 Mar 2024 14:25:44 +0100
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: linux-i2c@...r.kernel.org
Cc: Wolfram Sang <wsa+renesas@...g-engineering.com>,
	Jean Delvare <jdelvare@...e.com>,
	Andi Shyti <andi.shyti@...nel.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 51/64] i2c: sis630: reword according to newest specification

Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").

Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
---
 drivers/i2c/busses/i2c-sis630.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c
index 3505cf29cedd..7910ba2fce15 100644
--- a/drivers/i2c/busses/i2c-sis630.c
+++ b/drivers/i2c/busses/i2c-sis630.c
@@ -18,7 +18,7 @@
 	+------------------------+--------------------+-------------------+
 	| Clock                  | 14kHz/56kHz        | 55.56kHz/27.78kHz |
 	| SMBus registers offset | 0x80               | 0xE0              |
-	| SMB_CNT                | Bit 1 = Slave Busy | Bit 1 = Bus probe |
+	| SMB_CNT                | Bit 1 = Client Busy| Bit 1 = Bus probe |
 	|         (not used yet) | Bit 3 is reserved  | Bit 3 = Last byte |
 	| SMB_PCOUNT		 | Offset + 0x06      | Offset + 0x14     |
 	| SMB_COUNT              | 4:0 bits           | 5:0 bits          |
@@ -56,8 +56,8 @@
 
 /* SMB_CNT register */
 #define MSTO_EN			0x40	/* Host Master Timeout Enable */
-#define SMBCLK_SEL		0x20	/* Host master clock selection */
-#define SMB_PROBE		0x02	/* Bus Probe/Slave busy */
+#define SMBCLK_SEL		0x20	/* Host clock selection */
+#define SMB_PROBE		0x02	/* Bus Probe/Client busy */
 #define SMB_HOSTBUSY		0x01	/* Host Busy */
 
 /* SMBHOST_CNT register */
@@ -93,7 +93,7 @@ static bool high_clock;
 static bool force;
 module_param(high_clock, bool, 0);
 MODULE_PARM_DESC(high_clock,
-	"Set Host Master Clock to 56KHz (default 14KHz) (SIS630/730 only).");
+	"Set Host Clock to 56KHz (default 14KHz) (SIS630/730 only).");
 module_param(force, bool, 0);
 MODULE_PARM_DESC(force, "Forcibly enable the SIS630. DANGEROUS!");
 
@@ -144,8 +144,7 @@ static int sis630_transaction_start(struct i2c_adapter *adap, int size,
 
 	dev_dbg(&adap->dev, "saved clock 0x%02x\n", *oldclock);
 
-	/* disable timeout interrupt,
-	 * set Host Master Clock to 56KHz if requested */
+	/* disable timeout interrupt, set Host Clock to 56KHz if requested */
 	if (high_clock)
 		sis630_write(SMB_CNT, SMBCLK_SEL);
 	else
@@ -201,10 +200,7 @@ static void sis630_transaction_end(struct i2c_adapter *adap, u8 oldclock)
 	dev_dbg(&adap->dev,
 		"SMB_CNT before clock restore 0x%02x\n", sis630_read(SMB_CNT));
 
-	/*
-	 * restore old Host Master Clock if high_clock is set
-	 * and oldclock was not 56KHz
-	 */
+	/* restore old Host Clock if high_clock is set and oldclock was not 56KHz */
 	if (high_clock && !(oldclock & SMBCLK_SEL))
 		sis630_write(SMB_CNT, sis630_read(SMB_CNT) & ~SMBCLK_SEL);
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ