Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1134132lqp; Fri, 22 Mar 2024 06:40:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmYMgmcvyP81tHaw2FuNR05+0KaQ6wuiuZZ34IQyVfHODvbhxx7IvqhVYU9vznxuKoAOzbHEPxmSJdM8M7pJlqalixKGKoiPZldibvoQ== X-Google-Smtp-Source: AGHT+IEYP863uQMo/pSuphYvRbRhbwsASaMqENgLar+OlnXJaQ8aNF0g1wkl7xOllR2lBHjO3NKg X-Received: by 2002:a17:906:ca57:b0:a46:d591:873c with SMTP id jx23-20020a170906ca5700b00a46d591873cmr1726612ejb.18.1711114803275; Fri, 22 Mar 2024 06:40:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711114803; cv=pass; d=google.com; s=arc-20160816; b=a8nKhXMpTerTRm7eRXfSf07tI6riUMW7HOdQp7W0Sx84fx6bjYEzGYS4bbZyq9RlRi hj97InWUPZqn4Eg5KM4Xz+JS1S+4TXWDMyGtO+vEafWbiZokwExHrBfTP20BSgTjCX5x I2MliPK/Nv4ajBdI7s1Y9O0/u9A/7ZJAM2Ttt02u7BLr/bNC0leP4rhghtILBWxNEjFU RmyeG25nz6ymSWjTnM7sE92HWlHvI0P4Sm34iUcRGq156CBNGgIM7wzeUw3X4A6P676w gJCUHFuPz8xDgnNuOL/NxcULkgqq/KJU8GZ4vc53R1ynTgiK1ERKUR+aQ4KRXX+5UO0M TNvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ojlShxYbza+SZYG05qx4dWS+cyKPvErSpiJUhDaAhvw=; fh=cO2hYpAek1kzMumuC7kb9wnDjsRb+kzN71/5GaQ/aqA=; b=ewkVyZbAzQ/HxE1uyf1uF6ehK7Df1a39xPdAqlbEVqf7vZiQaQkQ3L2ytt4zkyGpvb /FGnabUq/dVDFeXMIrPf7GL3jwAtr1ps2Q42qU9ojAjG5LzyA1bTxHRwqwfxP3H48AlC CbgsrYPgzD/vkatl7Zffk+nm6JKoWmAPDicvlbZKyfbYwpLtPSMwXtfAYLdMxaZnQOPJ McQWpC6pIQSaCJIATF6F0bLlWgPOIrfbktzURbAhNAcqn8lnLAeY7qGxNhG+lIZgbtFq E2qWmppHp5gslNOt/EONVN2jpcKmNRg0udXCWYxWFn41ydZqQ9ovTdKO5ZTdpl5fagCj CO7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=GBR34C5f; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-111537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111537-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c14-20020a17090603ce00b00a46d8e5a02csi908282eja.19.2024.03.22.06.40.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 06:40:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=GBR34C5f; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-111537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111537-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D58BE1F21147 for ; Fri, 22 Mar 2024 13:40:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C46167E79; Fri, 22 Mar 2024 13:27:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="GBR34C5f" Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20016481DA for ; Fri, 22 Mar 2024 13:27:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711114054; cv=none; b=CMu5kNsS7svzfF+lepzOrqoYtZMEMHlzkby0h9kx7NG4WremBTppjmTvgGcrpAjXmJpcEIjYUoJLnLkZPChZlXVVqzkG32gcNwlnaF/OXBPsOywkU4qS4t/VjOvEOo6MArcs3NtXTvmoAEVJnvXrfIDuNUWoa1yXXNOp/nSfPP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711114054; c=relaxed/simple; bh=jhLyTeGZk3WHRGR+u+Pnghl/gFGCXwj7rHn2zZb+SRY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IJLaoPGgzIO06Rlmq8LhIo6Wr90vGBT1CWesBW0qhKN5B4gZ5CvxyxyKGA8yODvHY/1W4NjIBZXvsTJRQ3bxqrtNDhiT0ffq2sGLvr16PuC/EVBpcUHIDLuyl5h0bLugUfcc5JhmQZ5j4Y8hfuEcDctLEQDF9C2jJghl5raHbW4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=GBR34C5f; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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, }; -- 2.43.0