From patchwork Fri Mar 22 13:24:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600096 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A98A7C54E71 for ; Fri, 22 Mar 2024 13:27:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FIcXeIH2cCYLLq7yE9U7mxsuAEaZdFNnrYIzzGUh1Xc=; b=Ke0SEDXrEbk3zC x/bX3tSGd/rXs2EQcOqXNW13slk6AzhPMF3xjHDWzEGC03XHbHItIB45F6uh9PJbp98TgnSAZxC/1 RzCGW2nLZkjSGzK82ehtxUyKJPN0Q8xiJwxE5Hkq+a0NsGTMiLjRm3WKxLj+Kf/veYJRx2TFtGreb hXIAN+bRDT3PXVchVqzrH5gCQKYdd6DFexJioxQWT+sKBqEO3kw37NGCif0r3TEw4BnMdR95SH3aq zMKqjK8yFrxmNyv02G915WgXDdxoDloTcPE5E8HCvWdUAdTIils0UQpqvqLKq8rplRymEXXIc9Efq 7DOQsU4zAwNvx/0RObhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnev2-00000007I6c-3fW8; Fri, 22 Mar 2024 13:26:48 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rneut-00000007Hzf-3fG5 for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:26:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=1fuavoM1tsxpg+sffePeG5Oq2+/3E0Rj2cjqhiCzSao=; b=VQWMi+ Nxn8XW8Est4ionNwmGyCHOI4xrIV2OqLZlWhldTv8QMzXNBKLriYUHzfXMwQwpRm QI8+xYK8L9+XmjcruKkkvEyTmUtwYhK69yJC/5GBC5q4V/+u99GKN/DTAlQC+Ec+ 8WFS8NVRbDjfJS0DY7Lcx02PsJu5BB/XPEvhOwDuCp5+KUlQ7+++YVIwmMODpmGu Zx2/rsbpR9eON1AoLMXV1vbx8fKX5ikpFFL2dVh9qx00iayrWw4BHsZEgLwWkYVA RRBrRP3k4wj0T1ti4fNMjOd/C5zA/HI9nFz8O6ddH6Iw6FNKg/ySu37jJmWQM+Vc yhPeZScCs+KP0Tfw== Received: (qmail 3870173 invoked from network); 22 Mar 2024 14:26:25 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:26:25 +0100 X-UD-Smtp-Session: l3s3148p1@fm86xT8UYpNehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Andi Shyti , Andrew Jeffery , openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/64] i2c: aspeed: reword according to newest specification Date: Fri, 22 Mar 2024 14:24:58 +0100 Message-ID: <20240322132619.6389-6-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062640_240248_406CC5B5 X-CRM114-Status: GOOD ( 14.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Andrew Jeffery --- drivers/i2c/busses/i2c-aspeed.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c index ce8c4846b7fa..4e6ea4a5cab9 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -159,7 +159,7 @@ struct aspeed_i2c_bus { bool send_stop; int cmd_err; /* Protected only by i2c_lock_bus */ - int master_xfer_result; + int xfer_result; /* Multi-master */ bool multi_master; #if IS_ENABLED(CONFIG_I2C_SLAVE) @@ -608,9 +608,9 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status) out_complete: bus->msgs = NULL; if (bus->cmd_err) - bus->master_xfer_result = bus->cmd_err; + bus->xfer_result = bus->cmd_err; else - bus->master_xfer_result = bus->msgs_index + 1; + bus->xfer_result = bus->msgs_index + 1; complete(&bus->cmd_complete); out_no_complete: return irq_handled; @@ -679,7 +679,7 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id) return irq_remaining ? IRQ_NONE : IRQ_HANDLED; } -static int aspeed_i2c_master_xfer(struct i2c_adapter *adap, +static int aspeed_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { struct aspeed_i2c_bus *bus = i2c_get_adapdata(adap); @@ -738,7 +738,7 @@ static int aspeed_i2c_master_xfer(struct i2c_adapter *adap, return -ETIMEDOUT; } - return bus->master_xfer_result; + return bus->xfer_result; } static u32 aspeed_i2c_functionality(struct i2c_adapter *adap) @@ -748,7 +748,7 @@ static u32 aspeed_i2c_functionality(struct i2c_adapter *adap) #if IS_ENABLED(CONFIG_I2C_SLAVE) /* precondition: bus.lock has been acquired. */ -static void __aspeed_i2c_reg_slave(struct aspeed_i2c_bus *bus, u16 slave_addr) +static void __aspeed_i2c_reg_target(struct aspeed_i2c_bus *bus, u16 slave_addr) { u32 addr_reg_val, func_ctrl_reg_val; @@ -770,7 +770,7 @@ static void __aspeed_i2c_reg_slave(struct aspeed_i2c_bus *bus, u16 slave_addr) bus->slave_state = ASPEED_I2C_SLAVE_INACTIVE; } -static int aspeed_i2c_reg_slave(struct i2c_client *client) +static int aspeed_i2c_reg_target(struct i2c_client *client) { struct aspeed_i2c_bus *bus = i2c_get_adapdata(client->adapter); unsigned long flags; @@ -781,7 +781,7 @@ static int aspeed_i2c_reg_slave(struct i2c_client *client) return -EINVAL; } - __aspeed_i2c_reg_slave(bus, client->addr); + __aspeed_i2c_reg_target(bus, client->addr); bus->slave = client; spin_unlock_irqrestore(&bus->lock, flags); @@ -789,7 +789,7 @@ static int aspeed_i2c_reg_slave(struct i2c_client *client) return 0; } -static int aspeed_i2c_unreg_slave(struct i2c_client *client) +static int aspeed_i2c_unreg_target(struct i2c_client *client) { struct aspeed_i2c_bus *bus = i2c_get_adapdata(client->adapter); u32 func_ctrl_reg_val; @@ -814,11 +814,11 @@ static int aspeed_i2c_unreg_slave(struct i2c_client *client) #endif /* CONFIG_I2C_SLAVE */ static const struct i2c_algorithm aspeed_i2c_algo = { - .master_xfer = aspeed_i2c_master_xfer, + .xfer = aspeed_i2c_xfer, .functionality = aspeed_i2c_functionality, #if IS_ENABLED(CONFIG_I2C_SLAVE) - .reg_slave = aspeed_i2c_reg_slave, - .unreg_slave = aspeed_i2c_unreg_slave, + .reg_target = aspeed_i2c_reg_target, + .unreg_target = aspeed_i2c_unreg_target, #endif /* CONFIG_I2C_SLAVE */ }; @@ -950,7 +950,7 @@ static int aspeed_i2c_init(struct aspeed_i2c_bus *bus, #if IS_ENABLED(CONFIG_I2C_SLAVE) /* If slave has already been registered, re-enable it. */ if (bus->slave) - __aspeed_i2c_reg_slave(bus, bus->slave->addr); + __aspeed_i2c_reg_target(bus, bus->slave->addr); #endif /* CONFIG_I2C_SLAVE */ /* Set interrupt generation of I2C controller */ From patchwork Fri Mar 22 13:25:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600097 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A04D3C54E71 for ; Fri, 22 Mar 2024 13:27:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L/wSPXQiwxpiZ0EpWWtMpV031FyG7p4yRNe/LMPbNRo=; b=dKMk0w5YZqXPp5 LmIZKNQuxWHXUdAZWGknr0Z/eCjDvWSyiubavPf8mAG1jkDnOEJiqUrjTlJ9WJtSDEgvkmPv5gSnF AKyoiJP4zdQEclT7pXg/58tyznRDVDWXBKqKhrhaBjhN5F0AQOzZE49QRR45NMVjUB2m4xTIajiUS AHMujAUqPxASpyWU4qsIkdGqksIJGVL3Firqmc/HaDl/3wrgcwZslPMIVNS3iceDUJtCjbgrn1kFi D4Ljk3Y0pgC+pvhrXh72+fGxgP6HUVPKA1iMXq4bwWMjuEjeDk8ii15Q9fXL18PewQGIPNIvC2KG9 kQZ+wOlSRFqUx+TMln7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnev5-00000007I7m-1mTm; Fri, 22 Mar 2024 13:26:51 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rneuw-00000007I1F-2LM6 for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:26:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=+9eJDPYcvheHFhVWSeTXcV93NuGaWmWAwekU/Oh9CJ4=; b=Vfk35M JSUL85oEwdUpaoZywSUhRxjNWZFf91x1byAkI9WKNyJM/QbM1VfS2Fxb6cb2IvHT 1/EXdQaz2aj2f0uLFipQE/ze0asri/1BS+RMssCl4QWqbgQ2Xoa2z1IuQcT7oEFx jDeYf1s2IZJm0VYbTrom+PO5KqjUsZMIYQEhFIQ2FlGgoQ//LRU9/8CgWVdfQ67w mRKX5szDSTQWxcLnn+m7bw0lgL75+Tt1gb10JGDFSy5jiygKviWP/zbmJyLWToBt 7f79pX+sQ0F0Hl139XavzX7SymVIaIUVHIyDTZ3uCmjboWaGdqNZjk5CfBZjy896 Zl7wVryR1CdTCnQg== Received: (qmail 3870202 invoked from network); 22 Mar 2024 14:26:26 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:26:26 +0100 X-UD-Smtp-Session: l3s3148p1@tj9VxT8UdJNehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Andi Shyti , Ray Jui , Scott Branden , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/64] i2c: bcm-iproc: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:00 +0100 Message-ID: <20240322132619.6389-8-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062642_917049_DC0B7B4D X-CRM114-Status: GOOD ( 13.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-bcm-iproc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index e905734c26a0..3c68d4df029f 100644 --- a/drivers/i2c/busses/i2c-bcm-iproc.c +++ b/drivers/i2c/busses/i2c-bcm-iproc.c @@ -224,8 +224,8 @@ static void slave_rx_tasklet_fn(unsigned long); | BIT(IS_S_TX_UNDERRUN_SHIFT) | BIT(IS_S_RX_FIFO_FULL_SHIFT)\ | BIT(IS_S_RX_THLD_SHIFT)) -static int bcm_iproc_i2c_reg_slave(struct i2c_client *slave); -static int bcm_iproc_i2c_unreg_slave(struct i2c_client *slave); +static int bcm_iproc_i2c_reg_target(struct i2c_client *slave); +static int bcm_iproc_i2c_unreg_target(struct i2c_client *slave); static void bcm_iproc_i2c_enable_disable(struct bcm_iproc_i2c_dev *iproc_i2c, bool enable); @@ -987,17 +987,17 @@ static uint32_t bcm_iproc_i2c_functionality(struct i2c_adapter *adap) val = I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; - if (adap->algo->reg_slave) + if (adap->algo->reg_target) val |= I2C_FUNC_SLAVE; return val; } static struct i2c_algorithm bcm_iproc_algo = { - .master_xfer = bcm_iproc_i2c_xfer, + .xfer = bcm_iproc_i2c_xfer, .functionality = bcm_iproc_i2c_functionality, - .reg_slave = bcm_iproc_i2c_reg_slave, - .unreg_slave = bcm_iproc_i2c_unreg_slave, + .reg_target = bcm_iproc_i2c_reg_target, + .unreg_target = bcm_iproc_i2c_unreg_target, }; static const struct i2c_adapter_quirks bcm_iproc_i2c_quirks = { @@ -1079,8 +1079,8 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev) spin_lock_init(&iproc_i2c->idm_lock); /* no slave support */ - bcm_iproc_algo.reg_slave = NULL; - bcm_iproc_algo.unreg_slave = NULL; + bcm_iproc_algo.reg_target = NULL; + bcm_iproc_algo.unreg_target = NULL; } ret = bcm_iproc_i2c_init(iproc_i2c); @@ -1191,7 +1191,7 @@ static const struct dev_pm_ops bcm_iproc_i2c_pm_ops = { .resume_early = &bcm_iproc_i2c_resume }; -static int bcm_iproc_i2c_reg_slave(struct i2c_client *slave) +static int bcm_iproc_i2c_reg_target(struct i2c_client *slave) { struct bcm_iproc_i2c_dev *iproc_i2c = i2c_get_adapdata(slave->adapter); @@ -1210,7 +1210,7 @@ static int bcm_iproc_i2c_reg_slave(struct i2c_client *slave) return 0; } -static int bcm_iproc_i2c_unreg_slave(struct i2c_client *slave) +static int bcm_iproc_i2c_unreg_target(struct i2c_client *slave) { u32 tmp; struct bcm_iproc_i2c_dev *iproc_i2c = i2c_get_adapdata(slave->adapter); From patchwork Fri Mar 22 13:25:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600099 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E127CC54E71 for ; Fri, 22 Mar 2024 13:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CjzhadkD0UY9A1SCaqITb91+Ht/GD2yKNWVbo2XmJ0Q=; b=O8mIf98sOINEGM o7OTDy9rWLoCc9rmjwwMbr9xNIJubLTOGMouOTvu4RfcmFAjgkp/AeoSn2pq3YLGpnDH9oU3Cd789 ntxbFiiHAEAIsLfTeqPLbJEwrUqusab1jcGUIjZCyrVvM+4aW9BQgg5BuI1Q/11r0+s1kFjY1hDoP 53gn+BXFkwWC8h7JMT0hySxM997Phqrbslkiv9x8X4VJkA9ePeTi+N5bjhwZ08QZjbpzd8O9q2Jyc dFux1F2bFcJQwnWi52VCW6XULMzIKkXHAZHh1O3Q7RPlnYu+0E2uo+b6E6Ww8ded739G7MZiCZHro k0nneGNszKJ7o7lloePQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevs-00000007Ic1-1AJs; Fri, 22 Mar 2024 13:27:40 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rneuz-00000007I2q-08fR for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:26:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=nPqXdlyyhoVRqPKoOjv5iKVpiVyc/2GvO8xysHtbwCM=; b=h2lJ2/ uTAJuVBvALeij3E7HhDhVB7/fK2mdO61oqQuQUGso6rFwd3mqai5jyslxoAArUya G7AEv1uS4yCFb3QafOciA6sTPiEmxBa1mX7XqE8dQlOT/awHTHrT+9EyD//x77Zi xuu0OfvsAte5hCCHxQJd2F+OesgBwu3ifnUzPBi7Z/AU5vL+I5Bl0/rMNvmwZ6Pz AyCjlvju3pXnPiHUKYVAp6vcz+V2TfFDm4ABfuRbntk+ySkbOS9pN+bpgLfI9RqV kQYXAjgG9Vr0DxjGpR+MBeL5ah3ZlsiSZJxC9Qiv/FuwnI3vL3Pi+XU5xfIF7vR6 otuCNEvEKwnu6Bpg== Received: (qmail 3870228 invoked from network); 22 Mar 2024 14:26:28 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:26:28 +0100 X-UD-Smtp-Session: l3s3148p1@xr1uxT8UgJNehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Andi Shyti , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/64] i2c: bcm2835: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:02 +0100 Message-ID: <20240322132619.6389-10-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062645_510529_4493615C X-CRM114-Status: GOOD ( 14.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Florian Fainelli --- drivers/i2c/busses/i2c-bcm2835.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c index b92de1944221..62776e7fc586 100644 --- a/drivers/i2c/busses/i2c-bcm2835.c +++ b/drivers/i2c/busses/i2c-bcm2835.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * BCM2835 master mode driver + * BCM2835 host controller mode driver */ #include @@ -25,7 +25,7 @@ #define BCM2835_I2C_DEL 0x18 /* * 16-bit field for the number of SCL cycles to wait after rising SCL - * before deciding the slave is not responding. 0 disables the + * before deciding the client is not responding. 0 disables the * timeout detection. */ #define BCM2835_I2C_CLKT 0x1c @@ -223,7 +223,7 @@ static void bcm2835_drain_rxfifo(struct bcm2835_i2c_dev *i2c_dev) /* * Repeated Start Condition (Sr) * The BCM2835 ARM Peripherals datasheet mentions a way to trigger a Sr when it - * talks about reading from a slave with 10 bit address. This is achieved by + * talks about reading from a client with 10 bit address. This is achieved by * issuing a write, poll the I2CS.TA flag and wait for it to be set, and then * issue a read. * A comment in https://github.com/raspberrypi/linux/issues/254 shows how the @@ -391,7 +391,7 @@ static u32 bcm2835_i2c_func(struct i2c_adapter *adap) } static const struct i2c_algorithm bcm2835_i2c_algo = { - .master_xfer = bcm2835_i2c_xfer, + .xfer = bcm2835_i2c_xfer, .functionality = bcm2835_i2c_func, }; From patchwork Fri Mar 22 13:25:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600098 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E69DAC47DD9 for ; Fri, 22 Mar 2024 13:27:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DC8uXLXDm1y0Bx5Xarr0IXCgj7X9lAfKPxq9XMbvh9M=; b=39RfmyEcgJzvOa R9LBc21QUm/bhHo/i3b4w4zaUUmK23/bFM03c9Cn+Vw4gvA9eJuPzD2+0KjbHWjDkS+mSuRA3tZoL Hixo5VHsN+mw0FfGBJnvI2v4ixs0uTc3LOVhBn4JmVyPlfgjU5eS8GZUosd23aSUoTTEk5Rw/3IHh zjyZ5/WzJt/48VBDvR7rrR9RWSQdcf4qcJHrFlp1HDpMGaJnFrJmRyFUwB5GM/LYios3XRLm35fW0 5kkKi1mSiiaxCLCqI044rJ+2MDramoOJwKc50nGE84tMv5Bxk2Pz6oCO61ifK8w6xyyFpzrlP31Fo ZxqFtCgp/cp1ErOcqsGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevA-00000007ICS-0Lyl; Fri, 22 Mar 2024 13:26:56 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnev0-00000007I3U-0U0p for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:26:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=erf4Z8JIr6B+tpx1tzGIDc6Yy5XmMXEq/omWmLHe34o=; b=hnc1nT nRvT/YfV2ENjunXaB9nkkUUgozZNzCz9iQF0lQOPxzv3mHFBnxBVw0xg/I89kH4I cRoveeo8ka7Iw9lc6w8e9e/VJ5G5luTv+P6Zwc4FVwqewV6bQmsc77QTH882R7nO CG0h8SSo0H5CTeKT8k0u3vyfHkzwKVZDF1Vkn0hwDnfJ/un3MHM85mp/vdPntxFr FvLbg77zq2OCzqXCbtswGjaNC1vddHPUL3c7eFNwtihckkjk3ptzmXPcVtXs3khM KZxdHuc5R9uCShZH0tsPUw1yswB5uH0qM2VCiRU7LrOb98pwdH3fISVV7EQ3LfOV q3u3EiM7b9ft5gnw== Received: (qmail 3870244 invoked from network); 22 Mar 2024 14:26:29 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:26:29 +0100 X-UD-Smtp-Session: l3s3148p1@A5t7xT8UkJNehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Kamal Dasu , Broadcom internal kernel review list , Andi Shyti , Florian Fainelli , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/64] i2c: brcmstb: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:03 +0100 Message-ID: <20240322132619.6389-11-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062646_615343_72084084 X-CRM114-Status: GOOD ( 13.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Florian Fainelli Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-brcmstb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c index 38f276c99193..dfdf465e6f8c 100644 --- a/drivers/i2c/busses/i2c-brcmstb.c +++ b/drivers/i2c/busses/i2c-brcmstb.c @@ -67,7 +67,7 @@ /* BSC block register map structure to cache fields to be written */ struct bsc_regs { - u32 chip_address; /* slave address */ + u32 chip_address; /* client address */ u32 data_in[N_DATA_REGS]; /* tx data buffer*/ u32 cnt_reg; /* rx/tx data length */ u32 ctl_reg; /* control register */ @@ -320,7 +320,7 @@ static int brcmstb_send_i2c_cmd(struct brcmstb_i2c_dev *dev, return rc; } -/* Actual data transfer through the BSC master */ +/* Actual data transfer through the BSC controller */ static int brcmstb_i2c_xfer_bsc_data(struct brcmstb_i2c_dev *dev, u8 *buf, unsigned int len, struct i2c_msg *pmsg) @@ -441,7 +441,7 @@ static int brcmstb_i2c_do_addr(struct brcmstb_i2c_dev *dev, return 0; } -/* Master transfer function */ +/* Host transfer function */ static int brcmstb_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg msgs[], int num) { @@ -473,7 +473,7 @@ static int brcmstb_i2c_xfer(struct i2c_adapter *adapter, brcmstb_set_i2c_start_stop(dev, cond); - /* Send slave address */ + /* Send client address */ if (!(pmsg->flags & I2C_M_NOSTART)) { rc = brcmstb_i2c_do_addr(dev, pmsg); if (rc < 0) { @@ -545,8 +545,8 @@ static u32 brcmstb_i2c_functionality(struct i2c_adapter *adap) } static const struct i2c_algorithm brcmstb_i2c_algo = { - .master_xfer = brcmstb_i2c_xfer, - .master_xfer_atomic = brcmstb_i2c_xfer_atomic, + .xfer = brcmstb_i2c_xfer, + .xfer_atomic = brcmstb_i2c_xfer_atomic, .functionality = brcmstb_i2c_functionality, }; From patchwork Fri Mar 22 13:25:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600100 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4EE58C47DD9 for ; Fri, 22 Mar 2024 13:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dY4lXt0yQlqzn/N7G77nDZf/JDDFEgzA2EU0+2limCE=; b=XFyfCQI+BEyExX kt0raPc+BdFbMlcmrsYMpPP5tPNk1Ani/TJovYEzJpE5x44LQ449vu9rI31zqhwF4pXaFsBUpVcO4 cDvtVHFz/6BA32eW1+YRapZGAwcSOTinyaafdTwufwELqJpMIg7JKPQZekYRQfxdRm5wAzMJFC8hJ KGUlNTbnuvY7rMl8q6y3PJcKLx8rwIdRRylK5LBS6QiBGvhsUwHlDYK6jQLZiUZS81mEtUlRLVR0K rMR6PC7N04aqWqwm99bu65aUD5od270g/KzYtrxdGNJcn2vWwLhpFwkZ47mMj7Cg0LK52opWt1a/J uGM86U+zpUwOR06sF2Ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevt-00000007Ica-0vK1; Fri, 22 Mar 2024 13:27:41 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnev0-00000007I47-3lB5 for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:26:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=sPIndfoTUi+H7yC2Vw2N54ArxxcZ9SSScdyIHb5qHpg=; b=jgZFWc E83WdTi0EfWJTud1ynqA2PplpkcyePEsxtQ20N51vsqmi7751ncZqB2hZfcSgEcR M97D6YCIAedDg71nlBfDvaMYMC5pMR/zdTvAEYuFMihhZf7zkksHYU+lsvX5YBLG oLny3r+tT+vkOGAabF/qJP32PiiehoOGiqoaa4bxQOQeicwUdhkiRzAcVWQYFwlP wKTCMciq3j4A0eFnEgP8StB+eaEkpYcpSMLACW/Z5hEhHI0KuXB4RtNtIJcIVsxL cZKJv71ldw6lYAiM3SRJ1XXuRiBcXbXpWF11UFGeRT1XrLtAFnkbfcRou8nbuGB+ Mg96S92tGG4xCD3w== Received: (qmail 3870265 invoked from network); 22 Mar 2024 14:26:30 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:26:30 +0100 X-UD-Smtp-Session: l3s3148p1@phGJxT8UjuBehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Michal Simek , Andi Shyti , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/64] i2c: cadence: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:04 +0100 Message-ID: <20240322132619.6389-12-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062647_308470_BC8CC1CB X-CRM114-Status: GOOD ( 12.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-cadence.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c index 4bb7d6756947..91085e719689 100644 --- a/drivers/i2c/busses/i2c-cadence.c +++ b/drivers/i2c/busses/i2c-cadence.c @@ -808,7 +808,7 @@ static int cdns_i2c_process_msg(struct cdns_i2c *id, struct i2c_msg *msg, } /** - * cdns_i2c_master_xfer - The main i2c transfer function + * cdns_i2c_xfer - The main i2c transfer function * @adap: pointer to the i2c adapter driver instance * @msgs: pointer to the i2c message structure * @num: the number of messages to transfer @@ -817,7 +817,7 @@ static int cdns_i2c_process_msg(struct cdns_i2c *id, struct i2c_msg *msg, * * Return: number of msgs processed on success, negative error otherwise */ -static int cdns_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, +static int cdns_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { int ret, count; @@ -947,7 +947,7 @@ static u32 cdns_i2c_func(struct i2c_adapter *adap) } #if IS_ENABLED(CONFIG_I2C_SLAVE) -static int cdns_reg_slave(struct i2c_client *slave) +static int cdns_reg_target(struct i2c_client *slave) { int ret; struct cdns_i2c *id = container_of(slave->adapter, struct cdns_i2c, @@ -972,7 +972,7 @@ static int cdns_reg_slave(struct i2c_client *slave) return 0; } -static int cdns_unreg_slave(struct i2c_client *slave) +static int cdns_unreg_target(struct i2c_client *slave) { struct cdns_i2c *id = container_of(slave->adapter, struct cdns_i2c, adap); @@ -990,11 +990,11 @@ static int cdns_unreg_slave(struct i2c_client *slave) #endif static const struct i2c_algorithm cdns_i2c_algo = { - .master_xfer = cdns_i2c_master_xfer, + .xfer = cdns_i2c_xfer, .functionality = cdns_i2c_func, #if IS_ENABLED(CONFIG_I2C_SLAVE) - .reg_slave = cdns_reg_slave, - .unreg_slave = cdns_unreg_slave, + .reg_target = cdns_reg_target, + .unreg_target = cdns_unreg_target, #endif }; From patchwork Fri Mar 22 13:25:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52225C54E71 for ; Fri, 22 Mar 2024 13:27:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=281rJN2rOgMProFjglJYfnM3KpV6/fIEbR8Et6uwXsM=; b=dOwCRQr0++x8eA Z5UY7YQx/ghW2i55G7lP4JGmPO7TF5Izp/si4/i5qhSJ7B/XojegLlQJxrFRqBB+NdOWBRuHxcYMR spJuwVDF+KvRmpri0SXd4jogCFXXsyDiKULiTVWmgZJ4nlvRX0k/dKTnUKDnh5vucPBS4YL922AvT auOrqUG6rRppbN9hQWDVR6D2fJOAzjBEH66pAxPqCZweLixxQb1i8pz0SwZWMLS4oDLUscJ1tq9WF QQhhSkfGfscxrf/D/zjUciZQaIPUVNHxdZV/GqEYPBCZEGucNjcHp56dX6DqeG6s4ZTcfmyj0jF4W aB+M2SO7QltgbtVJgF+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevu-00000007IdW-0uxe; Fri, 22 Mar 2024 13:27:42 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnev4-00000007I6m-35Zv for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:26:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=bKgrZEObGcmhfV42TbjIYa6lNwDyHSA/oza3/g3uxco=; b=TAdyd+ hGz6KcvPtAGB6w6n5CXQ7uXp5/mcMwVTBZi2VYnAOuU+7dYoiDypDWdx0mRDWQv1 JwQPq0hF8kK4eQ1TowJtQke0OYjQIojBRBf403/aksRzZdUfvoWwf9erT5lGOHs6 tVbGV8zsGZTcdsZAzkdxrTvP1X7rH7Zp+sbdtDz6gUD8G9YtUQim2bI/zkyP3VrQ trsKtHSzlgxSk7NXLKk7n298VC3Ow9EP/P0BP/T6eunzU7DLYbh6rhhbD01nw3yg 4eZt84TTZV/IDA5AzDDUT12gZ8iJhKTlRcu7st3DS9UacQYtoVevRpN86oT72Ef5 fIeM/5dBJHXKKiqQ== Received: (qmail 3870370 invoked from network); 22 Mar 2024 14:26:33 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:26:33 +0100 X-UD-Smtp-Session: l3s3148p1@Gxi9xT8UuuBehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Bartosz Golaszewski , Andi Shyti , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/64] i2c: davinci: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:08 +0100 Message-ID: <20240322132619.6389-16-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062651_481879_D31C83FE X-CRM114-Status: GOOD ( 14.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Acked-by: Bartosz Golaszewski --- drivers/i2c/busses/i2c-davinci.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 02b3b1160fb0..1884d77934e9 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -263,7 +263,7 @@ static int i2c_davinci_init(struct davinci_i2c_dev *dev) /* compute clock dividers */ i2c_davinci_calc_clk_dividers(dev); - /* Respond at reserved "SMBus Host" slave address" (and zero); + /* Respond at reserved "SMBus Host" client address" (and zero); * we seem to have no option to not respond... */ davinci_i2c_write_reg(dev, DAVINCI_I2C_OAR_REG, DAVINCI_I2C_OWN_ADDRESS); @@ -407,7 +407,7 @@ static int i2c_davinci_wait_bus_not_busy(struct davinci_i2c_dev *dev) } /* - * Low level master read/write transaction. This function is called + * Low level host read/write transaction. This function is called * from i2c_davinci_xfer. */ static int @@ -428,7 +428,7 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop) if (pdata->bus_delay) udelay(pdata->bus_delay); - /* set the slave address */ + /* set the client address */ davinci_i2c_write_reg(dev, DAVINCI_I2C_SAR_REG, msg->addr); dev->buf = msg->buf; @@ -440,10 +440,9 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop) reinit_completion(&dev->cmd_complete); dev->cmd_err = 0; - /* Take I2C out of reset and configure it as master */ + /* Take I2C out of reset and configure it as host */ flag = DAVINCI_I2C_MDR_IRS | DAVINCI_I2C_MDR_MST; - /* if the slave address is ten bit address, enable XA bit */ if (msg->flags & I2C_M_TEN) flag |= DAVINCI_I2C_MDR_XA; if (!(msg->flags & I2C_M_RD)) @@ -688,7 +687,7 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id) break; case DAVINCI_I2C_IVR_AAS: - dev_dbg(dev->dev, "Address as slave interrupt\n"); + dev_dbg(dev->dev, "Address as client interrupt\n"); break; default: @@ -745,7 +744,7 @@ static inline void i2c_davinci_cpufreq_deregister(struct davinci_i2c_dev *dev) #endif static const struct i2c_algorithm i2c_davinci_algo = { - .master_xfer = i2c_davinci_xfer, + .xfer = i2c_davinci_xfer, .functionality = i2c_davinci_func, }; From patchwork Fri Mar 22 13:25:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600101 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9BA90CD11DB for ; Fri, 22 Mar 2024 13:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LCEyQ1eLHdyr6bGLzm/v+Z05pVy/3HIRDFP1p9f98J8=; b=uGbQGtAsNleK6W Le2jQNilJ+6OAkWQcAjytxss9TAeZcz00c8FqptKxQ13ymrZ8YdAvo1X2brXI4H3orpR5YeRgR3ZI dsp0PrskTmGUJwNSpqchtqVDXEUW28kwxx79xgV1/8AQUny6WsF2TD67gCE2ZV8/rBaMvj4E8Sjsi letIix15a4/IW3d/MN9J76gRlnpjh2dwaGlk/Gpob7EY33mdopZCahzvsEyauhFPAk4e+oLKjDktH 4oOjnfSK89XcijZhNXZ6jJqyrRLnlXPc4dublRk8qoK3+JbRkNafwNOXmt5yyGunMS22Ku3IYCDto hnXrZ/kKFSn7jj7hCVDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevv-00000007Iem-3nG1; Fri, 22 Mar 2024 13:27:43 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnev5-00000007I7J-1onz for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:26:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=Qu3vk6w/0m8AM5GY0guKeGtY0uhOhyvvrd8UxUlbHVQ=; b=K+Hqkw MHpY2i1IaxFUSVbDNRcfcIgO7dod5HZW8PGN+Jf/bHeKSiLOnfja1ibkdVOWbJLr P7PfSih92G7W1yW4k67T+t89P31K6PTCIPPJsPb5vK13mOqWPRt7b69cj0GH5Fuc /wLDqEvUpAJMvHp8VuUihYHvc6rUKnOeWx/NHhnKnGjqffgiMdcMs/6GPFReC3wJ OOrcMGR/57+W5jskecPllC/z/5I31wAUb1dZ9zBD0Ir5oyyz1BqL+FLJLFDs1MKc AAUmBnxgPjO4elSKGAzOzX5Sn5sKpzqkyjHXi5bqcsGXBeybzgUwN9rLJQ7PoJ0P GEjdfmcm6/BtYZhQ== Received: (qmail 3870420 invoked from network); 22 Mar 2024 14:26:34 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:26:34 +0100 X-UD-Smtp-Session: l3s3148p1@XQbKxT8UxOBehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Andi Shyti , Baruch Siach , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/64] i2c: digicolor: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:09 +0100 Message-ID: <20240322132619.6389-17-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062651_861522_95CDC0BF X-CRM114-Status: GOOD ( 12.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-digicolor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c index 3462f2bc0fa8..0d777f5c6b41 100644 --- a/drivers/i2c/busses/i2c-digicolor.c +++ b/drivers/i2c/busses/i2c-digicolor.c @@ -281,7 +281,7 @@ static u32 dc_i2c_func(struct i2c_adapter *adap) } static const struct i2c_algorithm dc_i2c_algorithm = { - .master_xfer = dc_i2c_xfer, + .xfer = dc_i2c_xfer, .functionality = dc_i2c_func, }; @@ -372,5 +372,5 @@ static struct platform_driver dc_i2c_driver = { module_platform_driver(dc_i2c_driver); MODULE_AUTHOR("Baruch Siach "); -MODULE_DESCRIPTION("Conexant Digicolor I2C master driver"); +MODULE_DESCRIPTION("Conexant Digicolor I2C controller driver"); MODULE_LICENSE("GPL v2"); From patchwork Fri Mar 22 13:25:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 26FF2C47DD9 for ; Fri, 22 Mar 2024 13:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0/JfY7L1ba0S2YJMUC8AMcjdjVPGUn0P9lyoWrv5z+4=; b=LWSJKDTOgrhCKd mnAlyuh5y9MUh1CQEEjQXVugai3TMe2+Rim0Z7YEqapQMTZG9p2EozRQKMiUvULEJg5N2oqSw7HhB hG/78+ZXYPYk10FajZBvGL1yud/6dgsMy5vDhyc9iE5gij5rWitDH7bUzcdO+xANwBUahyw+sb3uX GUgRoWI3gNgPvPn0c0CjBfX6ru6YVJ3wAGBVCDaQFzfcFj/BzObLBCA0b4bLlvTsr4QpJZB9gI+HX ui/b6lI8Nj3wqr/AeShWbAw4l3fge2cgg1rk3uDERVrm/+baJ0z9CJ3YV2SMA5qExLShGAZCR1/7P 3q8yM64oEzs6FjRORHVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevx-00000007IfU-16U5; Fri, 22 Mar 2024 13:27:45 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevD-00000007IE3-1ury for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:27:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=vWbyFOf4V5PXU0iX7KbH4cd/yxRPi16DHsMc4aLJqy8=; b=dsjJPE hALiYPDPqtAFQ9EyzYechmRJCyKo2h6c35ksfOQrlgN1rmUEg4Y7fLngd2J9G9p+ Oz0qQTHVz4dyoVxysc3oIAd6aqrD8dQRVBORRlMCPZGEdR4jQ2LW/DqZfTAfoosv +biP1HBKQbD508GCkIiyb+YRG9E/PbE7lFGuIFBsw79gPg0F2oH+mWImZLKKIpzs 9MltKvpsXhxOhqVMhDQwY4xWK9SoMDk6X9kz/J5121N3QLsWaVz5j4ZSUuswAA9g V3CWKqHMUpyk6P94HcL5l5ldZJhTATEzYi8BfVlUOJHG53Mw+tVekPrFcBCnzfwW gbk3bi9HmsyGDb7A== Received: (qmail 3870775 invoked from network); 22 Mar 2024 14:26:42 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:26:42 +0100 X-UD-Smtp-Session: l3s3148p1@rQJJxj8UupRehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Dong Aisheng , Andi Shyti , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 26/64] i2c: imx-lpi2c: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:19 +0100 Message-ID: <20240322132619.6389-27-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062700_097962_14C4D4D5 X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-imx-lpi2c.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c index 6d72e4e126dd..337a55804463 100644 --- a/drivers/i2c/busses/i2c-imx-lpi2c.c +++ b/drivers/i2c/busses/i2c-imx-lpi2c.c @@ -262,7 +262,7 @@ static int lpi2c_imx_config(struct lpi2c_imx_struct *lpi2c_imx) return 0; } -static int lpi2c_imx_master_enable(struct lpi2c_imx_struct *lpi2c_imx) +static int lpi2c_imx_host_enable(struct lpi2c_imx_struct *lpi2c_imx) { unsigned int temp; int ret; @@ -292,7 +292,7 @@ static int lpi2c_imx_master_enable(struct lpi2c_imx_struct *lpi2c_imx) return ret; } -static int lpi2c_imx_master_disable(struct lpi2c_imx_struct *lpi2c_imx) +static int lpi2c_imx_host_disable(struct lpi2c_imx_struct *lpi2c_imx) { u32 temp; @@ -459,7 +459,7 @@ static int lpi2c_imx_xfer(struct i2c_adapter *adapter, unsigned int temp; int i, result; - result = lpi2c_imx_master_enable(lpi2c_imx); + result = lpi2c_imx_host_enable(lpi2c_imx); if (result) return result; @@ -502,7 +502,7 @@ static int lpi2c_imx_xfer(struct i2c_adapter *adapter, result = -EIO; disable: - lpi2c_imx_master_disable(lpi2c_imx); + lpi2c_imx_host_disable(lpi2c_imx); dev_dbg(&lpi2c_imx->adapter.dev, "<%s> exit with: %s: %d\n", __func__, (result < 0) ? "error" : "success msg", @@ -554,7 +554,7 @@ static u32 lpi2c_imx_func(struct i2c_adapter *adapter) } static const struct i2c_algorithm lpi2c_imx_algo = { - .master_xfer = lpi2c_imx_xfer, + .xfer = lpi2c_imx_xfer, .functionality = lpi2c_imx_func, }; From patchwork Fri Mar 22 13:25:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600104 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 845E8CD11DB for ; Fri, 22 Mar 2024 13:28:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YpV1ntdTNZiI+W/0ebQ5bzAQTFsl2iP+EW3gp/W3dIw=; b=g6FDoVPQ8fJaNm x9qnmkg6Qsfcq3etcGBE4dO6Hwn6c89K+HWZEp6CReAeovxc2vpTeFegmWU0HXMNp75/LbM8Okro7 +ppaK75XMagpe3lF219KDB0LKruIvLhJtlizxEo3zp+jutK0kWULGueoUT3T0PZIcGbnGoAzsb04c DJeXI6/Aewc1nYawXjJ6ezgJ0AAuaGuipUIzRvKEBokHdYQ2C0wZy9X7RVF6G9LmPaO5on8NZvHqp 9XcKMKrpL4389iLylmhrX5bcFPX0coj8KaeXkxT8L085IgCWY+DdYzo6c7PLePdDpmLugxLsGia8w /RPGKE37SvhV1uYipYmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnew0-00000007Iif-1w3o; Fri, 22 Mar 2024 13:27:48 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevG-00000007IFy-1Vtx for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:27:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=bxTOjroMQTFdH0tamjYqLu6EXC9WA3N/+/W5k3pAme4=; b=ewDbTv O/KmCvY4DF9BpDUr32mSq6++5TXqeP7aIBnT2Fi+pL7afcGap5lAI91qqjgSNlD1 ikSM+5pgzN47cyyzG+LAMTlplOurxuEYeFIsrMfKx47B2G0yzFgb7T3FNja1qjT3 H45X54rBZSO9k3H80mfuFM1466I2Ov9aBP81i5UPT7jb+bxPVE6qtInjYE5Z7wcR CBzhdxDOP3KSj/rv8rQWsM/P9Fmhjc0Bdv5oAINB1oxeRFzU3OqNWqapQVXzHLAe U79ydGjQYFbdvoU8gJu7bGslIBAFGa060s1zSu1iI3NA/PIPbg6u72nnIOyiqyPf 9Mimqz9l+BlUkoaQ== Received: (qmail 3871008 invoked from network); 22 Mar 2024 14:26:46 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:26:46 +0100 X-UD-Smtp-Session: l3s3148p1@RjaHxj8U6pRehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Vladimir Zapolskiy , Andi Shyti , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 31/64] i2c: lpc2k: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:24 +0100 Message-ID: <20240322132619.6389-32-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062703_042631_CF491538 X-CRM114-Status: GOOD ( 13.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-lpc2k.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-lpc2k.c b/drivers/i2c/busses/i2c-lpc2k.c index e3660333e91c..f0cb217973c1 100644 --- a/drivers/i2c/busses/i2c-lpc2k.c +++ b/drivers/i2c/busses/i2c-lpc2k.c @@ -50,7 +50,7 @@ /* * 26 possible I2C status codes, but codes applicable only - * to master are listed here and used in this driver + * to host mode are listed here and used in this driver */ enum { M_BUS_ERROR = 0x00, @@ -157,7 +157,7 @@ static void i2c_lpc2k_pump_msg(struct lpc2k_i2c *i2c) break; case MR_ADDR_R_ACK: - /* Receive first byte from slave */ + /* Receive first byte from client */ if (i2c->msg->len == 1) { /* Last byte, return NACK */ writel(LPC24XX_AA, i2c->base + LPC24XX_I2CONCLR); @@ -196,7 +196,7 @@ static void i2c_lpc2k_pump_msg(struct lpc2k_i2c *i2c) } /* - * One pre-last data input, send NACK to tell the slave that + * One pre-last data input, send NACK to tell the client that * this is going to be the last data byte to be transferred. */ if (i2c->msg_idx >= i2c->msg->len - 2) { @@ -338,7 +338,7 @@ static u32 i2c_lpc2k_functionality(struct i2c_adapter *adap) } static const struct i2c_algorithm i2c_lpc2k_algorithm = { - .master_xfer = i2c_lpc2k_xfer, + .xfer = i2c_lpc2k_xfer, .functionality = i2c_lpc2k_functionality, }; From patchwork Fri Mar 22 13:25:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600105 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C55B6C47DD9 for ; Fri, 22 Mar 2024 13:29:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lVP8hzla85F5YeKeehDEPA6tnJWXIjKvVNDSgpkqlJo=; b=xfR8JB0DgGY25+ JSwrDtpO5Oi/oHk2vjpoARJ42MDMWJlDzA1FViYf3xsM0cDlfKZIb6yvB/lHBGp7BnZIkAN8vbk59 qtbyxoOUumzjtCCofM5uvgXmc/c7f6IP+Ty+dP2Kw72OKjJgx1y7p+VaKS3SgX/TdTJ1elloKl1aH lOrzRKh56Xp3GO1ibo49YnI9m2FkSsIjZREip11cA8PsVlxV+ahy0+uWGpu9W8gzeTs0AjNPVtN5+ OIJDbfrcX97QavZ1y6JUVf+tt1Yo7+sqNpCyFjvQZ251W5qVd5xM97pr8KgTthdi/umHGXQsP533u RPnJHc2PqsTSnV6f+lBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnex5-00000007JRi-0V7o; Fri, 22 Mar 2024 13:28:55 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rneve-00000007IUT-0amU for linux-arm-kernel@bombadil.infradead.org; Fri, 22 Mar 2024 13:27:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=IJHYhfVob2IIWsQ5AQJ5s3UyVYL/b57GkPzyj7v/jBg=; b=icVdukgV/B05eKouttti9UKbiO bqNA9NSRNY8EPy5wxJAidOGMtK8BSIUf3ZctSf306JJdHt2HtOJxS1yswcEHUSBGXNPuo3A9ibJU9 oq2dieGHXX04etgxuM/mr6WF6jzs0xZ+PN9jfBC8873YE2YrGbzwrP5XwVlKcZWmXvd8a7Eb5U093 4dDZC3td3bYTitdHza5YhWmhuF1naUX4Fp23OUstjUGYRRMYQyWa2SgPWewexl1f+sTT+zWKUjY6r hMxSw0sVxFL6SIuA+EfNKJoJWmUJ4hIqIRok2cNKPiGcN3Icxn7KAJ+Zny0hR3xLdVQ+MdE0qmL2i DdXzwmJw==; Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevY-0000000EoAU-1Leb for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:27:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=IJHYhfVob2IIWsQ5AQJ5s3UyVYL/b57GkPzyj7v/jBg=; b=JCMAym uga3ra3pl3AOnmrwJi+DoCpjdViinewm+Jrkxp2tUUg5+4qvjHsMoVJDnMYzdOdP Rc9GL2yFF8CmeEY+oX5O+hrHfZnckry2xlToCZuJ6LGvjDwBU5cOzQyv2kkXRdmv JS8OVBwmZTDS9PqcEF99N57dVzwLQNXwvDxMeuCmtqBC9eaMDIlFM+YAyZRwLtLq t5+4ttz9MxH3DOPGqSiIR+S1pd7/p7+DiPO2hygssgv3ZBw4OYt9TxJe4g1/TBn9 FJlquben0fO4ZN1YD/GYRLqXAxwBY63oNrCbfL+VHWLFG49I55JAP1XwVl3IJqVx x3fhs7hLAXxyq6IA== Received: (qmail 3871264 invoked from network); 22 Mar 2024 14:26:51 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:26:51 +0100 X-UD-Smtp-Session: l3s3148p1@y13Wxj8UVLBehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Stefan Roese , Andi Shyti , Matthias Brugger , AngeloGioacchino Del Regno , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 37/64] i2c: mt7621: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:30 +0100 Message-ID: <20240322132619.6389-38-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_132720_712167_AB69C0EF X-CRM114-Status: GOOD ( 14.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Stefan Roese --- drivers/i2c/busses/i2c-mt7621.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/i2c/busses/i2c-mt7621.c b/drivers/i2c/busses/i2c-mt7621.c index 81d46169bc1f..c567a2cf4a90 100644 --- a/drivers/i2c/busses/i2c-mt7621.c +++ b/drivers/i2c/busses/i2c-mt7621.c @@ -117,26 +117,26 @@ static int mtk_i2c_check_ack(struct mtk_i2c *i2c, u32 expected) return ((ack & ack_expected) == ack_expected) ? 0 : -ENXIO; } -static int mtk_i2c_master_start(struct mtk_i2c *i2c) +static int mtk_i2c_host_start(struct mtk_i2c *i2c) { iowrite32(SM0CTL1_START | SM0CTL1_TRI, i2c->base + REG_SM0CTL1_REG); return mtk_i2c_wait_idle(i2c); } -static int mtk_i2c_master_stop(struct mtk_i2c *i2c) +static int mtk_i2c_host_stop(struct mtk_i2c *i2c) { iowrite32(SM0CTL1_STOP | SM0CTL1_TRI, i2c->base + REG_SM0CTL1_REG); return mtk_i2c_wait_idle(i2c); } -static int mtk_i2c_master_cmd(struct mtk_i2c *i2c, u32 cmd, int page_len) +static int mtk_i2c_host_cmd(struct mtk_i2c *i2c, u32 cmd, int page_len) { iowrite32(cmd | SM0CTL1_TRI | SM0CTL1_PGLEN(page_len), i2c->base + REG_SM0CTL1_REG); return mtk_i2c_wait_idle(i2c); } -static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, +static int mtk_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { struct mtk_i2c *i2c; @@ -157,7 +157,7 @@ static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, goto err_timeout; /* start sequence */ - ret = mtk_i2c_master_start(i2c); + ret = mtk_i2c_host_start(i2c); if (ret) goto err_timeout; @@ -169,14 +169,14 @@ static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, if (pmsg->flags & I2C_M_RD) addr |= 1; iowrite32(addr, i2c->base + REG_SM0D0_REG); - ret = mtk_i2c_master_cmd(i2c, SM0CTL1_WRITE, 2); + ret = mtk_i2c_host_cmd(i2c, SM0CTL1_WRITE, 2); if (ret) goto err_timeout; } else { /* 7 bits address */ addr = i2c_8bit_addr_from_msg(pmsg); iowrite32(addr, i2c->base + REG_SM0D0_REG); - ret = mtk_i2c_master_cmd(i2c, SM0CTL1_WRITE, 1); + ret = mtk_i2c_host_cmd(i2c, SM0CTL1_WRITE, 1); if (ret) goto err_timeout; } @@ -202,7 +202,7 @@ static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, cmd = SM0CTL1_WRITE; } - ret = mtk_i2c_master_cmd(i2c, cmd, page_len); + ret = mtk_i2c_host_cmd(i2c, cmd, page_len); if (ret) goto err_timeout; @@ -222,7 +222,7 @@ static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, } } - ret = mtk_i2c_master_stop(i2c); + ret = mtk_i2c_host_stop(i2c); if (ret) goto err_timeout; @@ -230,7 +230,7 @@ static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, return i; err_ack: - ret = mtk_i2c_master_stop(i2c); + ret = mtk_i2c_host_stop(i2c); if (ret) goto err_timeout; return -ENXIO; @@ -247,7 +247,7 @@ static u32 mtk_i2c_func(struct i2c_adapter *a) } static const struct i2c_algorithm mtk_i2c_algo = { - .master_xfer = mtk_i2c_master_xfer, + .xfer = mtk_i2c_xfer, .functionality = mtk_i2c_func, }; From patchwork Fri Mar 22 13:25:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8D57C47DD9 for ; Fri, 22 Mar 2024 13:29:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mzkZAybvpDLMyZlxEznenynFRFmiDpYNpqXgOXTQPX4=; b=TacWXyTak50xQm 0zFnAfIBhvIAcGqRo/WbMCXM83+l+FYOSJ6EDFCKXxGswCCzUmPl46bcWU80j02RF5mkuaTfUbA+w edu5al9huODPHrjbxeHSUbSZL4Mk0FuOtiFI6hfUyhikfKk70L8sroXefn2hYUy6FyK6CdlaUuU92 y/dwcyAcnlfaiilmXVxc0Fa3o8InYw5vVkn2Ee/iBLrOXINQa7n55q9ZKPD/THdTYHzZi8KsXeLTX pm/BSlcqLPoxYgtU9qOC9//I3r179UclVqiPAYjrC8LdXpyU2hkPg84OpXJQfn+GMx7Oqx1BD3ldq wfNadVTqKXT8VQDVb3fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnex2-00000007JQF-45NF; Fri, 22 Mar 2024 13:28:53 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevb-00000007ITn-2pqQ for linux-arm-kernel@bombadil.infradead.org; Fri, 22 Mar 2024 13:27:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=OoNwixtQZ8u2Ylf1U91QXuREyq7/jiz/2k1ymkgoJiw=; b=PNgmL3Tn+HplF/j5PEl/xYlCGy vmNhReK+udu2NZJ3bRFA3oilUm28KxemY8UKXUOqLHT8+AhNILPj9+66PvMS1r2dleduXt+casADk SrteWfgANjgaJOT0wqSvwjqEgZqe+BqnVy4VfyA9ocLsPLNG3YU+6DmW1q7r+FX01al8PigzHyCQp RhR0xgdUiU0zN9LgrGSYAO0jlvy2fw/iC5rcy7h1p4pgwjgz0Wh+3czd6YWVPgsexV5l/zVPW+0Vl nkVq8TactJRWuCVQvpWVeD6KgiJDq5XS62dYSF3csNvP35WqCpLZlWlVYJ46/CslgN6ZNW08/lnUD 7zXIUs7Q==; Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevY-0000000EoAp-1mVF for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:27:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=OoNwixtQZ8u2Ylf1U91QXuREyq7/jiz/2k1ymkgoJiw=; b=fDvcCs /oGhIMo9aFYcMjZrAhR/c+tbMWgGgXyPtgGOZ0tYU2bOigtIIgp2AGCYqesFvLHo oEOxca5UI3fIVov00dTI9sHoNZ6ejLlRSyuWmKFbkua/wdHbuOkdEHjajZh0hRXq VyHhqjHjXDPYcnXcY8loQ+cbONbRTnFDkHa4m0KHzeZjPHpNq40jf56BlxPAoApS IoDp6jVqYynAsAh1io9sVyRzqCd2nkIiQ0owRRwTdU1t1qSuWdOa/F7qRSOE9QZC Q8St+R918q/fnYP69ik9wGxFXLBy66VwvRU5A+juRXsAI5ADTavgpmOhMz4DjEF8 bI9CkQM0nskXqDZg== Received: (qmail 3871375 invoked from network); 22 Mar 2024 14:26:54 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:26:54 +0100 X-UD-Smtp-Session: l3s3148p1@xUD9xj8UdLBehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Andi Shyti , =?utf-8?q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam , linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 40/64] i2c: owl: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:33 +0100 Message-ID: <20240322132619.6389-41-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_132720_658538_D0FFCB1E X-CRM114-Status: GOOD ( 13.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-owl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-owl.c b/drivers/i2c/busses/i2c-owl.c index 777f1a0278c7..cb90e1b2775c 100644 --- a/drivers/i2c/busses/i2c-owl.c +++ b/drivers/i2c/busses/i2c-owl.c @@ -172,7 +172,7 @@ static void owl_i2c_xfer_data(struct owl_i2c_dev *i2c_dev) i2c_dev->err = 0; - /* Handle NACK from slave */ + /* Handle NACK from client */ fifostat = readl(i2c_dev->base + OWL_I2C_REG_FIFOSTAT); if (fifostat & OWL_I2C_FIFOSTAT_RNB) { i2c_dev->err = -ENXIO; @@ -302,7 +302,7 @@ static int owl_i2c_xfer_common(struct i2c_adapter *adap, struct i2c_msg *msgs, OWL_I2C_CTL_IRQE, !atomic); /* - * Select: FIFO enable, Master mode, Stop enable, Data count enable, + * Select: FIFO enable, host mode, Stop enable, Data count enable, * Send start bit */ i2c_cmd = OWL_I2C_CMD_SECL | OWL_I2C_CMD_MSS | OWL_I2C_CMD_SE | @@ -314,7 +314,7 @@ static int owl_i2c_xfer_common(struct i2c_adapter *adap, struct i2c_msg *msgs, i2c_cmd |= OWL_I2C_CMD_AS(msgs[0].len + 1) | OWL_I2C_CMD_SAS(1) | OWL_I2C_CMD_RBE; - /* Write slave address */ + /* Write client address */ addr = i2c_8bit_addr_from_msg(&msgs[0]); writel(addr, i2c_dev->base + OWL_I2C_REG_TXDAT); @@ -420,8 +420,8 @@ static int owl_i2c_xfer_atomic(struct i2c_adapter *adap, } static const struct i2c_algorithm owl_i2c_algorithm = { - .master_xfer = owl_i2c_xfer, - .master_xfer_atomic = owl_i2c_xfer_atomic, + .xfer = owl_i2c_xfer, + .xfer_atomic = owl_i2c_xfer_atomic, .functionality = owl_i2c_func, }; From patchwork Fri Mar 22 13:25:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600108 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CAD9C47DD9 for ; Fri, 22 Mar 2024 13:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EOoBma4PfLDOD4HuIR78WIpjfVuu3oiKnnUCy2FvRwM=; b=nGtAEY01UC7C3d tLk28sqXgyCWLu0rMg/Im5mBheBzqBrFafg5xwQTjVTu3KWJRmpI5EWz3/8C8vzNlVEaQvBa9B726 Rq8lPz/b4ZzwyRR11E+2IyUdmL7uAAkAObBFdqsWUQaJTa9MK60qC3+O008INF3Ny+UPArKAUVumZ VLSrq+dIc4A/5DVowW+ThN6BliNlBWcZuhKlPv9Us4BbxeJdNm9rT4ddectP/g1bxC/TMJyCdVaH/ F13Sldv5v/pxsruphXoTzqsaldKMFW/N4G0wxJs0S5ip8GlEi+Tg40d/2nxBlOqApEveoPqktHUTM 8V+eMxMVvBh6mcCwmNCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnex6-00000007JSt-1KX6; Fri, 22 Mar 2024 13:28:56 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevY-00000007IR9-0kHz for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:27:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=+hOidMzQoPW9FHhIvSwRON+Z3xIeGflbT7fmNTj31kw=; b=EHt8A5 K4PaG12m12qc8DQFQX600kMWpr/bc6hl5B4LVHXRSeCg2rWPiwMWLAC0h4f7wZp0 aC4CFWfOgRoORdJOTuDgGHrOnGMYvL2eufHzKH2SYPdfq3z00V8fL079lgA6LpjF OgOjYGlU1GkHjoRg/ZfW6S07owCZf09PC4WIkOLC0MrERZNdwBKvIyAwMXHhAZ6l r/k3cA26FwfwPbnOsSYTQXq+tIhbd9UAnjzi2ii3TxB6ILfl1Sqc+E0BiZ7FmkR9 kAEXsRsWPCm/6HKJD6OvTd2eyHy0MFTRyzdJpf+ok0y+JmfT3STzNePa5g7WZGP8 XlbsQAa86GIjBu9g== Received: (qmail 3871717 invoked from network); 22 Mar 2024 14:27:00 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:27:00 +0100 X-UD-Smtp-Session: l3s3148p1@7yFVxz8UCJRehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Heiko Stuebner , Andi Shyti , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 47/64] i2c: rk3x: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:40 +0100 Message-ID: <20240322132619.6389-48-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062721_301593_77FC891F X-CRM114-Status: GOOD ( 15.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Heiko Stuebner --- drivers/i2c/busses/i2c-rk3x.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c index 086fdf262e7b..01febd886bdd 100644 --- a/drivers/i2c/busses/i2c-rk3x.c +++ b/drivers/i2c/busses/i2c-rk3x.c @@ -28,8 +28,8 @@ /* Register Map */ #define REG_CON 0x00 /* control register */ #define REG_CLKDIV 0x04 /* clock divisor register */ -#define REG_MRXADDR 0x08 /* slave address for REGISTER_TX */ -#define REG_MRXRADDR 0x0c /* slave register address for REGISTER_TX */ +#define REG_MRXADDR 0x08 /* client address for REGISTER_TX */ +#define REG_MRXRADDR 0x0c /* client register address for REGISTER_TX */ #define REG_MTXCNT 0x10 /* number of bytes to be transmitted */ #define REG_MRXCNT 0x14 /* number of bytes to be received */ #define REG_IEN 0x18 /* interrupt enable */ @@ -68,8 +68,8 @@ enum { /* REG_IEN/REG_IPD bits */ #define REG_INT_BTF BIT(0) /* a byte was transmitted */ #define REG_INT_BRF BIT(1) /* a byte was received */ -#define REG_INT_MBTF BIT(2) /* master data transmit finished */ -#define REG_INT_MBRF BIT(3) /* master data receive finished */ +#define REG_INT_MBTF BIT(2) /* host data transmit finished */ +#define REG_INT_MBRF BIT(3) /* host data receive finished */ #define REG_INT_START BIT(4) /* START condition generated */ #define REG_INT_STOP BIT(5) /* STOP condition generated */ #define REG_INT_NAKRCV BIT(6) /* NACK received */ @@ -184,7 +184,7 @@ struct rk3x_i2c_soc_data { * @wait: the waitqueue to wait for i2c transfer * @busy: the condition for the event to wait for * @msg: current i2c message - * @addr: addr of i2c slave device + * @addr: addr of i2c client device * @mode: mode of i2c transfer * @is_last_msg: flag determines whether it is the last msg in this transfer * @state: state of i2c transfer @@ -979,7 +979,7 @@ static int rk3x_i2c_setup(struct rk3x_i2c *i2c, struct i2c_msg *msgs, int num) /* * The I2C adapter can issue a small (len < 4) write packet before * reading. This speeds up SMBus-style register reads. - * The MRXADDR/MRXRADDR hold the slave address and the slave register + * The MRXADDR/MRXRADDR hold the client address and the client register * address in this case. */ @@ -1016,7 +1016,7 @@ static int rk3x_i2c_setup(struct rk3x_i2c *i2c, struct i2c_msg *msgs, int num) addr |= 1; /* set read bit */ /* - * We have to transmit the slave addr first. Use + * We have to transmit the client addr first. Use * MOD_REGISTER_TX for that purpose. */ i2c->mode = REG_CON_MOD_REGISTER_TX; @@ -1162,8 +1162,8 @@ static u32 rk3x_i2c_func(struct i2c_adapter *adap) } static const struct i2c_algorithm rk3x_i2c_algorithm = { - .master_xfer = rk3x_i2c_xfer, - .master_xfer_atomic = rk3x_i2c_xfer_polling, + .xfer = rk3x_i2c_xfer, + .xfer_atomic = rk3x_i2c_xfer_polling, .functionality = rk3x_i2c_func, }; From patchwork Fri Mar 22 13:25:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600106 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1BE4CD11DB for ; Fri, 22 Mar 2024 13:29:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gZwyYmNBzf9fmsCSf7p9ZJ1+WsSAooX9q+Vd6EUCNLQ=; b=068Id9lkYArAbh D3+Q5XGj7qs1ODEmhRRcHlZVaOafoGejCVbYuGu4QIIxl4N7POOdpmfPr0HE+8qdvbFNa5E+lbn2w AckEN9q+34eH+E/ReLpb4UPQCXmBrtj3fx+t9C/Jev3EAKAd+rjvRz9NEKXhzEK7lbJSFlVLGfyeM exMNbJ+2UDTWW+LgQS5hz3ePpgtOa5jzLvShvz3qbDZpMDDr6h/jFC7a1Nwxfa3Hx4/8mcLuqk5TH tFLxrh7Rgmni/7nUu9NZvtRHHZn48cfyz5TjQB0fKtOPE2gGZyymNWKk2N4JuOChHQ1WXOIZKRjoK EUeJFs1GmY9FxZBEMISw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnex7-00000007JTm-1oDD; Fri, 22 Mar 2024 13:28:57 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevd-00000007IUJ-2RzQ for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:27:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=q9awUK66ih3cxClf+OK6PD+a5C0mloAeIXzXtRewe0s=; b=WXjSqL KrBBsD1jGigAfGAL+K4qkhUyPMVxqmUNq+ABWOAYICUcC/yz7dGMFFTbEHGwjuQC ul49r+QkL8I8OJZLIIJ/s/VWr8PtA7dYORzVfmKv/YdEq3cu4VS+gqVYGLFeOFgB R0KK1ufbVJhh5UNICcd1LCCtGKfNZHCyZK/axqPlXdKF+VC4xlNvfH/J86nuD3Ut eNJmFKbMTEeCPW4pw7+7MmLhYmiZr4mFnk4VoPMbMpixRnv/JNYvkuRV2gqb/G4r jBJEp+wvuHL9/CXABQu4L8T70zUjJPkdm2Ra4ewakHivIbPPfZLlsQu8Ae5FwApt 3afwCr5rpMG2G0rg== Received: (qmail 3871926 invoked from network); 22 Mar 2024 14:27:05 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:27:05 +0100 X-UD-Smtp-Session: l3s3148p1@HMKfxz8UPpRehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Patrice Chotard , Andi Shyti , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 53/64] i2c: st: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:46 +0100 Message-ID: <20240322132619.6389-54-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062726_624779_26128718 X-CRM114-Status: GOOD ( 13.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-st.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c index ce2333408904..9bd45ae83c0c 100644 --- a/drivers/i2c/busses/i2c-st.c +++ b/drivers/i2c/busses/i2c-st.c @@ -2,7 +2,7 @@ /* * Copyright (C) 2013 STMicroelectronics * - * I2C master mode controller driver, used in STMicroelectronics devices. + * I2C host controller driver, used in STMicroelectronics devices. * * Author: Maxime Coquelin */ @@ -150,7 +150,7 @@ struct st_i2c_timings { /** * struct st_i2c_client - client specific data - * @addr: 8-bit slave addr, including r/w bit + * @addr: 8-bit client addr, including r/w bit * @count: number of bytes to be transfered * @xfered: number of bytes already transferred * @buf: data buffer @@ -647,7 +647,7 @@ static int st_i2c_xfer_msg(struct st_i2c_dev *i2c_dev, struct i2c_msg *msg, { struct st_i2c_client *c = &i2c_dev->client; u32 ctl, i2c, it; - unsigned long timeout; + unsigned long time_left; int ret; c->addr = i2c_8bit_addr_from_msg(msg); @@ -667,7 +667,7 @@ static int st_i2c_xfer_msg(struct st_i2c_dev *i2c_dev, struct i2c_msg *msg, i2c |= SSC_I2C_ACKG; st_i2c_set_bits(i2c_dev->base + SSC_I2C, i2c); - /* Write slave address */ + /* Write client address */ st_i2c_write_tx_fifo(i2c_dev, c->addr); /* Pre-fill Tx fifo with data in case of write */ @@ -685,15 +685,12 @@ static int st_i2c_xfer_msg(struct st_i2c_dev *i2c_dev, struct i2c_msg *msg, st_i2c_set_bits(i2c_dev->base + SSC_I2C, SSC_I2C_STRTG); } - timeout = wait_for_completion_timeout(&i2c_dev->complete, + time_left = wait_for_completion_timeout(&i2c_dev->complete, i2c_dev->adap.timeout); ret = c->result; - if (!timeout) { - dev_err(i2c_dev->dev, "Write to slave 0x%x timed out\n", - c->addr); + if (!time_left) ret = -ETIMEDOUT; - } i2c = SSC_I2C_STOPG | SSC_I2C_REPSTRTG; st_i2c_clr_bits(i2c_dev->base + SSC_I2C, i2c); @@ -769,7 +766,7 @@ static u32 st_i2c_func(struct i2c_adapter *adap) } static const struct i2c_algorithm st_i2c_algo = { - .master_xfer = st_i2c_xfer, + .xfer = st_i2c_xfer, .functionality = st_i2c_func, }; From patchwork Fri Mar 22 13:25:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8A24FCD11DB for ; Fri, 22 Mar 2024 13:29:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hrdSxYkgd2tgfnWIm2n9116yLkyrm72G4S4MBIzafwU=; b=rK8LEosYGmHFi4 imUZSJIbIqzCDel0H2dmw3DcRC6p8xUs1qPGQUTyvO4RTbQNCptKd5D02zzUouHomLR3VHHsBx2AR Gm02DO8/0qD7EIBZAomdM8AJwVPMD7y4/ntSw+IGneRhmAYJ4zGnbLeh8FRpkMUtdyQEDsOHcSzYH kg1x6xkyNnDUxPCZdjf3AIdIs40/iMD0O1fWKH6I2IOD6YEzO+FOCPV9F7B5As1TxMnyn4piXVAKQ i07Ooi6feOU/E3vhuoaDPMpKY1WpIfpR9jhD34FotLi5EtOEJ5KnSO7glvT90edm3zuPDph/vlTjB +JgMAqO1fJV7AEWO7QeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnex9-00000007JV9-3ECg; Fri, 22 Mar 2024 13:28:59 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevf-00000007IUd-108j for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:27:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=v5icbxJz6JkP2dpvAuHf8kDHkY/a+aKxThUJ7RMnku8=; b=dZ9Tpq DjfvPnqYwJtDQcHEgBqxDnzAKKnJ3VU1tjc/rrXPkf+9nnGOnfOqlSGafJGIVZP6 ROpLbnxNrSAowYXsvgKf+8YD27AVoKRd+CVNAIrkcowPWR5gaxqRMM/5kKWpycTs D5ChfZAmfkQqsFyFXea1/goq4Df0dQqRWeyXY+XuloF9LqgKrxpGJJtGazDyhLIW D4dHOqL1MLnS0EXK+ZDAhjzcDoqPvyr79MbAQ0tNAz5bWtMSBDoXvnpp0N3O8qXV AcN1wn7/pHqFLP9Dksau7EbNIhSSyHUDyg2N6+2NCu+RZ+0JUigNg3+k01lDOpU3 vnczVBL9ntCLhMbg== Received: (qmail 3871957 invoked from network); 22 Mar 2024 14:27:05 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:27:05 +0100 X-UD-Smtp-Session: l3s3148p1@liKsxz8UQpRehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Pierre-Yves MORDRET , Alain Volmat , Andi Shyti , Maxime Coquelin , Alexandre Torgue , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 54/64] i2c: stm32f4: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:47 +0100 Message-ID: <20240322132619.6389-55-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062727_659972_66411AF8 X-CRM114-Status: GOOD ( 11.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-stm32f4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-stm32f4.c b/drivers/i2c/busses/i2c-stm32f4.c index 859ac0cf7f6c..297f2ace6b94 100644 --- a/drivers/i2c/busses/i2c-stm32f4.c +++ b/drivers/i2c/busses/i2c-stm32f4.c @@ -95,7 +95,7 @@ /** * struct stm32f4_i2c_msg - client specific data - * @addr: 8-bit slave addr, including r/w bit + * @addr: 8-bit client addr, including r/w bit * @count: number of bytes to be transferred * @buf: data buffer * @result: result of the transfer @@ -480,7 +480,7 @@ static void stm32f4_i2c_handle_rx_done(struct stm32f4_i2c_dev *i2c_dev) /** * stm32f4_i2c_handle_rx_addr() - Handle address matched interrupt in case of - * master receiver + * host receiver * @i2c_dev: Controller's private data */ static void stm32f4_i2c_handle_rx_addr(struct stm32f4_i2c_dev *i2c_dev) @@ -643,7 +643,7 @@ static irqreturn_t stm32f4_i2c_isr_error(int irq, void *data) /* * Acknowledge failure: - * In master transmitter mode a Stop must be generated by software + * In host transmitter mode a Stop must be generated by software */ if (status & STM32F4_I2C_SR1_AF) { if (!(msg->addr & I2C_M_RD)) { @@ -749,7 +749,7 @@ static u32 stm32f4_i2c_func(struct i2c_adapter *adap) } static const struct i2c_algorithm stm32f4_i2c_algo = { - .master_xfer = stm32f4_i2c_xfer, + .xfer = stm32f4_i2c_xfer, .functionality = stm32f4_i2c_func, }; From patchwork Fri Mar 22 13:25:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 43D74C47DD9 for ; Fri, 22 Mar 2024 13:29:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YKCe07rPmTpp1j+CuHuasuuDYc6kz34YD5KJofwTeWU=; b=fgWoPwRCSU8l0Z 07xkCRpRe6MZGuLba/UWJ9rgBa6WJuPzeF0jqvxv5wb0hWoOz+SsMtBxI48sb6t24cbiQofFNMt0F d3FZFr2FCRHV2+ggSkj+08N5P9bs40yWxBKczYlagXEShywecRhbvGZiVAaIvSPVsk6+yKj0MUjHC gZstOjbNzzFp5D3Mj7w7g0gNfFbVKYZEwwa4WQ1bXFHo5ZP3J6BLJKrqENQZ3AR1twDJ/zZHmKq5t qUnvozcZMaOBdbvPS27rCAUoY552q3JefnfLZ4ZIxUx2MtHQDiCsgxeKH6Mu1Z7vQ5IL/EA8BKmax t4SJwy6FKnfx0BUh6Gyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnexG-00000007Ja9-1O2h; Fri, 22 Mar 2024 13:29:06 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevg-00000007IVT-1FrS for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:27:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=ytanu7H5eyBZ7/uQQrpibeDO0nDWqRUtTfFni6jgrYU=; b=Inynn4 cAKloAbOe1BMSWTKEXk7UMn0qEswaNtZvclzB3S8odDdfdfITHmo2/62ZfDZpNIR 8fl7Bcf9mY4DQlRcYBuLInnJiv7UNO37dnV4mCw0kboQkBLO590Br59mJNhuefCB FJmIU9jS1nMraNXQjhwNKQCvJU2z6WJpvROZs/TYehnzltuqj9SJ0DR+XgGRBbtr krLYxgtd0VQYdvlc2NdAZzSe/ewx7ruXzuojGVSqkQrGqXbzYFudnKeDZHLSh2XB +iZh2fE7d5xyyssuuO5gBMEZNik5iPgqNvmkdXr7VqLfd61D2vxpkdfP25Zelayr OzhdHCVcZJECLJZA== Received: (qmail 3872005 invoked from network); 22 Mar 2024 14:27:06 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:27:06 +0100 X-UD-Smtp-Session: l3s3148p1@rO+4xz8URpRehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Andi Shyti , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 55/64] i2c: sun6i-p2wi: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:48 +0100 Message-ID: <20240322132619.6389-56-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062728_725620_347EFAD2 X-CRM114-Status: GOOD ( 20.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-sun6i-p2wi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-sun6i-p2wi.c b/drivers/i2c/busses/i2c-sun6i-p2wi.c index 85e035e7a1d7..bb01746738b1 100644 --- a/drivers/i2c/busses/i2c-sun6i-p2wi.c +++ b/drivers/i2c/busses/i2c-sun6i-p2wi.c @@ -10,7 +10,7 @@ * The P2WI controller looks like an SMBus controller which only supports byte * data transfers. But, it differs from standard SMBus protocol on several * aspects: - * - it supports only one slave device, and thus drop the address field + * - it supports only one client device, and thus drop the address field * - it adds a parity bit every 8bits of data * - only one read access is required to read a byte (instead of a write * followed by a read access in standard SMBus protocol) @@ -88,7 +88,7 @@ struct p2wi { void __iomem *regs; struct clk *clk; struct reset_control *rstc; - int slave_addr; + int client_addr; }; static irqreturn_t p2wi_interrupt(int irq, void *dev_id) @@ -121,7 +121,7 @@ static int p2wi_smbus_xfer(struct i2c_adapter *adap, u16 addr, struct p2wi *p2wi = i2c_get_adapdata(adap); unsigned long dlen = P2WI_DLEN_DATA_LENGTH(1); - if (p2wi->slave_addr >= 0 && addr != p2wi->slave_addr) { + if (p2wi->client_addr >= 0 && addr != p2wi->client_addr) { dev_err(&adap->dev, "invalid P2WI address\n"); return -EINVAL; } @@ -188,7 +188,7 @@ static int p2wi_probe(struct platform_device *pdev) unsigned long parent_clk_freq; u32 clk_freq = I2C_MAX_STANDARD_MODE_FREQ; struct p2wi *p2wi; - u32 slave_addr; + u32 client_addr; int clk_div; int irq; int ret; @@ -207,7 +207,7 @@ static int p2wi_probe(struct platform_device *pdev) } if (of_get_child_count(np) > 1) { - dev_err(dev, "P2WI only supports one slave device\n"); + dev_err(dev, "P2WI only supports one client device\n"); return -EINVAL; } @@ -215,24 +215,24 @@ static int p2wi_probe(struct platform_device *pdev) if (!p2wi) return -ENOMEM; - p2wi->slave_addr = -1; + p2wi->client_addr = -1; /* * Authorize a p2wi node without any children to be able to use an * i2c-dev from userpace. - * In this case the slave_addr is set to -1 and won't be checked when + * In this case the client_addr is set to -1 and won't be checked when * launching a P2WI transfer. */ childnp = of_get_next_available_child(np, NULL); if (childnp) { - ret = of_property_read_u32(childnp, "reg", &slave_addr); + ret = of_property_read_u32(childnp, "reg", &client_addr); if (ret) { - dev_err(dev, "invalid slave address on node %pOF\n", + dev_err(dev, "invalid client address on node %pOF\n", childnp); return -EINVAL; } - p2wi->slave_addr = slave_addr; + p2wi->client_addr = client_addr; } p2wi->regs = devm_platform_ioremap_resource(pdev, 0); From patchwork Fri Mar 22 13:25:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600112 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0794CD11DB for ; Fri, 22 Mar 2024 13:29:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y7dF17U6BB03vOq1H4BuLjqV0ZgQrcAeKQjintDUabY=; b=VKjPsymIG78mSx V3QE/Oroaptn4bm7dfLgW7pIdqVBZ1t+nqLKvwFYev74zB0tTPFxK+LsBkRnun2gkmcJp1205cRIi C24VfhQxvCM8uBlF0WJquX9tR2Wa8MnpmBYE7cOUKnPsQZ7BnvqvYHMHTqljX0+WhdcPm3NRWN644 JE/cfQlvAZIC9zqXOoSw1fnmoF9tv2KEEtaLuNpF4tVxeW0PDLSMLX7S9IJSfxSeoN1S3HTmt78S3 BGgo2QJU12F+zWTEA2v29kx2tH19ffZIdZV+T0zc052JCuBWWkLzle+x4VHgIEcqISf5mBDRifgHj a9DqR+wTkTKcxJPrKWLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnexB-00000007JWM-31c8; Fri, 22 Mar 2024 13:29:01 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevj-00000007IXe-3LfH for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:27:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=ojlShxYbza+SZYG05qx4dWS+cyKPvErSpiJUhDaAhvw=; b=GBR34C 5fRnZMFT00dyS/5pEocuK9pcD9YxRL7bfWCtpP9I8e5pKmx+AZcBca28bCKKCRSt L+54jpaVEYtYE1y/yWzxZ02ftHaUzQvcTOQlN/cc9dMj/umLYUKgfMfGBn3L6QlK 8JmZY8i4uoy+FPbzk0MLBnBadkGRSytRjE70t14zCDhypDqcvUaGSSG2NkR/ObNd WPbdS+G9W1KcsAIURiKpMcTPVU7+BPcfncvj3JoyTEWJDmQmdEKVStqoyqF0Jtbf Ck7Kk+MWmmNTFxIpFCLmjeg2qSlRhcuVMNOsAeFQJS3T59f/tlaaj8b8/j7HOrzF DOA7a0sRCLH18MWg== Received: (qmail 3872176 invoked from network); 22 Mar 2024 14:27:10 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:27:10 +0100 X-UD-Smtp-Session: l3s3148p1@Bzrrxz8UgoVehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Andi Shyti , Kunihiko Hayashi , Masami Hiramatsu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 59/64] i2c: uniphier-f: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:52 +0100 Message-ID: <20240322132619.6389-60-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062732_142730_5F17ADC6 X-CRM114-Status: GOOD ( 16.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-uniphier-f.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c index dbc91c7c3788..f075c83a81b9 100644 --- a/drivers/i2c/busses/i2c-uniphier-f.c +++ b/drivers/i2c/busses/i2c-uniphier-f.c @@ -12,15 +12,15 @@ #include #define UNIPHIER_FI2C_CR 0x00 /* control register */ -#define UNIPHIER_FI2C_CR_MST BIT(3) /* master mode */ +#define UNIPHIER_FI2C_CR_MST BIT(3) /* host mode */ #define UNIPHIER_FI2C_CR_STA BIT(2) /* start condition */ #define UNIPHIER_FI2C_CR_STO BIT(1) /* stop condition */ #define UNIPHIER_FI2C_CR_NACK BIT(0) /* do not return ACK */ #define UNIPHIER_FI2C_DTTX 0x04 /* TX FIFO */ -#define UNIPHIER_FI2C_DTTX_CMD BIT(8) /* send command (slave addr) */ +#define UNIPHIER_FI2C_DTTX_CMD BIT(8) /* send command (client addr) */ #define UNIPHIER_FI2C_DTTX_RD BIT(0) /* read transaction */ #define UNIPHIER_FI2C_DTRX 0x04 /* RX FIFO */ -#define UNIPHIER_FI2C_SLAD 0x0c /* slave address */ +#define UNIPHIER_FI2C_SLAD 0x0c /* client address */ #define UNIPHIER_FI2C_CYC 0x10 /* clock cycle control */ #define UNIPHIER_FI2C_LCTL 0x14 /* clock low period control */ #define UNIPHIER_FI2C_SSUT 0x18 /* restart/stop setup time control */ @@ -96,7 +96,7 @@ static void uniphier_fi2c_fill_txfifo(struct uniphier_fi2c_priv *priv, int fifo_space = UNIPHIER_FI2C_FIFO_SIZE; /* - * TX-FIFO stores slave address in it for the first access. + * TX-FIFO stores client address in it for the first access. * Decrement the counter. */ if (first) @@ -252,7 +252,7 @@ static void uniphier_fi2c_tx_init(struct uniphier_fi2c_priv *priv, u16 addr, /* do not use TX byte counter */ writel(0, priv->membase + UNIPHIER_FI2C_TBC); - /* set slave address */ + /* set client address */ writel(UNIPHIER_FI2C_DTTX_CMD | addr << 1, priv->membase + UNIPHIER_FI2C_DTTX); /* @@ -288,7 +288,7 @@ static void uniphier_fi2c_rx_init(struct uniphier_fi2c_priv *priv, u16 addr) uniphier_fi2c_set_irqs(priv); - /* set slave address with RD bit */ + /* set client address with RD bit */ writel(UNIPHIER_FI2C_DTTX_CMD | UNIPHIER_FI2C_DTTX_RD | addr << 1, priv->membase + UNIPHIER_FI2C_DTTX); } @@ -310,7 +310,7 @@ static void uniphier_fi2c_recover(struct uniphier_fi2c_priv *priv) i2c_recover_bus(&priv->adap); } -static int uniphier_fi2c_master_xfer_one(struct i2c_adapter *adap, +static int uniphier_fi2c_xfer_one(struct i2c_adapter *adap, struct i2c_msg *msg, bool repeat, bool stop) { @@ -340,7 +340,7 @@ static int uniphier_fi2c_master_xfer_one(struct i2c_adapter *adap, uniphier_fi2c_tx_init(priv, msg->addr, repeat); /* - * For a repeated START condition, writing a slave address to the FIFO + * For a repeated START condition, writing a client address to the FIFO * kicks the controller. So, the UNIPHIER_FI2C_CR register should be * written only for a non-repeated START condition. */ @@ -404,7 +404,7 @@ static int uniphier_fi2c_check_bus_busy(struct i2c_adapter *adap) return 0; } -static int uniphier_fi2c_master_xfer(struct i2c_adapter *adap, +static int uniphier_fi2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { struct i2c_msg *msg, *emsg = msgs + num; @@ -419,7 +419,7 @@ static int uniphier_fi2c_master_xfer(struct i2c_adapter *adap, /* Emit STOP if it is the last message or I2C_M_STOP is set. */ bool stop = (msg + 1 == emsg) || (msg->flags & I2C_M_STOP); - ret = uniphier_fi2c_master_xfer_one(adap, msg, repeat, stop); + ret = uniphier_fi2c_xfer_one(adap, msg, repeat, stop); if (ret) return ret; @@ -435,7 +435,7 @@ static u32 uniphier_fi2c_functionality(struct i2c_adapter *adap) } static const struct i2c_algorithm uniphier_fi2c_algo = { - .master_xfer = uniphier_fi2c_master_xfer, + .xfer = uniphier_fi2c_xfer, .functionality = uniphier_fi2c_functionality, }; From patchwork Fri Mar 22 13:25:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13600110 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F37AC47DD9 for ; Fri, 22 Mar 2024 13:29:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6outsO76BVTMHZ6xmE6sJE32P37nfqbqipA/OnWfPsk=; b=Obej9aFWY+QTAK DH7dWopw7jANr6zhWUcBy7Xj7fFO8OP4fwszFBJM0r03hmXXHfU8x9Yl7+JiUEVFuEleTsfMbVaN1 Fq/6QGwYG7cSDiTj/k4g7M3qFs7UvotE3ovbZYy10vIAAwz61nvOK4u2fsRn0IA8sdImmcE/tYD/y DwDcPuUh8YXAQ2jwTnMS3bZOHW+Q0+gyd0GbrRugmJGvV4wxBTomGjFchVz4z8cgyIsQ6Zpp1Llsr u2bqqVkBBO3t2XdTiE+v+RrhraP/KbE0ft4OYYW6pQjy6zsK5JA6DC9wDmSJYmQ21eF3eqwF3KYt0 0o5VqUrXo3/yEVa7XxMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnexD-00000007JXw-38vx; Fri, 22 Mar 2024 13:29:03 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnevk-00000007IY4-3J8V for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 13:27:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=pNDXCQJWEJcm+0I8ITtre6MA5ngwubwyMT7G66YGQs8=; b=eoToXG TCFgYji2g71PGFtc8kW6niXi3BT91uP+mrg4nlIDALWADXsH0tweq8adp+cRKyOd NEo5E3JvPGaRbQ171hjJKDzrlMDycM3M0C2SfN5x9aTTbxbY23FTDTDR+xTbiBZf 3of3Pewm309EgmqBkToOUE4AE6HI30lhQwVyvQnUWG3mA9fJnESFF9enRLkpiykY CanLLS2cTxc7DUBuP7ZNvRPr1EQ2vNvn4jRVwyZO44AgWsvvgBtqfypEcaaKrrVU 0MMESwya4AEq0ndk+5TGtEh9dq8jcJ7sGXChvb6pdWc2JTAr8y1IRNQV5VI6eIQO 94MxS3uV5joGXmBw== Received: (qmail 3872213 invoked from network); 22 Mar 2024 14:27:10 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Mar 2024 14:27:10 +0100 X-UD-Smtp-Session: l3s3148p1@rsz3xz8UhoVehhtF From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Andi Shyti , Kunihiko Hayashi , Masami Hiramatsu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 60/64] i2c: uniphier: reword according to newest specification Date: Fri, 22 Mar 2024 14:25:53 +0100 Message-ID: <20240322132619.6389-61-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> References: <20240322132619.6389-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_062734_147157_09AB0084 X-CRM114-Status: GOOD ( 13.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-uniphier.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-uniphier.c b/drivers/i2c/busses/i2c-uniphier.c index 854ac25b5862..24fa15c92845 100644 --- a/drivers/i2c/busses/i2c-uniphier.c +++ b/drivers/i2c/busses/i2c-uniphier.c @@ -17,13 +17,13 @@ #define UNIPHIER_I2C_DTRM_NACK BIT(8) /* do not return ACK */ #define UNIPHIER_I2C_DTRM_RD BIT(0) /* read transaction */ #define UNIPHIER_I2C_DREC 0x04 /* RX register */ -#define UNIPHIER_I2C_DREC_MST BIT(14) /* 1 = master, 0 = slave */ +#define UNIPHIER_I2C_DREC_MST BIT(14) /* 1 = host, 0 = target */ #define UNIPHIER_I2C_DREC_TX BIT(13) /* 1 = transmit, 0 = receive */ #define UNIPHIER_I2C_DREC_STS BIT(12) /* stop condition detected */ #define UNIPHIER_I2C_DREC_LRB BIT(11) /* no ACK */ #define UNIPHIER_I2C_DREC_LAB BIT(9) /* arbitration lost */ #define UNIPHIER_I2C_DREC_BBN BIT(8) /* bus not busy */ -#define UNIPHIER_I2C_MYAD 0x08 /* slave address */ +#define UNIPHIER_I2C_MYAD 0x08 /* target address */ #define UNIPHIER_I2C_CLK 0x0c /* clock frequency control */ #define UNIPHIER_I2C_BRST 0x10 /* bus reset */ #define UNIPHIER_I2C_BRST_FOEN BIT(1) /* normal operation */ @@ -154,7 +154,7 @@ static int uniphier_i2c_stop(struct i2c_adapter *adap) UNIPHIER_I2C_DTRM_NACK); } -static int uniphier_i2c_master_xfer_one(struct i2c_adapter *adap, +static int uniphier_i2c_xfer_one(struct i2c_adapter *adap, struct i2c_msg *msg, bool stop) { bool is_read = msg->flags & I2C_M_RD; @@ -213,7 +213,7 @@ static int uniphier_i2c_check_bus_busy(struct i2c_adapter *adap) return 0; } -static int uniphier_i2c_master_xfer(struct i2c_adapter *adap, +static int uniphier_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { struct i2c_msg *msg, *emsg = msgs + num; @@ -227,7 +227,7 @@ static int uniphier_i2c_master_xfer(struct i2c_adapter *adap, /* Emit STOP if it is the last message or I2C_M_STOP is set. */ bool stop = (msg + 1 == emsg) || (msg->flags & I2C_M_STOP); - ret = uniphier_i2c_master_xfer_one(adap, msg, stop); + ret = uniphier_i2c_xfer_one(adap, msg, stop); if (ret) return ret; } @@ -241,7 +241,7 @@ static u32 uniphier_i2c_functionality(struct i2c_adapter *adap) } static const struct i2c_algorithm uniphier_i2c_algo = { - .master_xfer = uniphier_i2c_master_xfer, + .xfer = uniphier_i2c_xfer, .functionality = uniphier_i2c_functionality, };