Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-i2c@vger.kernel.org
Cc: Andi Shyti <andi.shyti@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 37/64] i2c: mt7621: reword according to newest specification
Date: Mon, 25 Mar 2024 09:07:43 +0100	[thread overview]
Message-ID: <7da930c8-d6d1-47e3-b346-b0e9e75edb54@denx.de> (raw)
In-Reply-To: <20240322132619.6389-38-wsa+renesas@sang-engineering.com>

On 3/22/24 14:25, Wolfram Sang wrote:
> Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
> specifications and replace "master/slave" with more appropriate terms.
> They are also more specific because we distinguish now between a remote
> entity ("client") and a local one ("target").
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   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,
>   };
>   

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de


  parent reply	other threads:[~2024-03-25  8:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 13:24 [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification Wolfram Sang
2024-03-22 13:25 ` [PATCH 37/64] i2c: mt7621: reword " Wolfram Sang
2024-03-25  8:06   ` AngeloGioacchino Del Regno
2024-03-25  8:07   ` Stefan Roese [this message]
2024-03-22 13:25 ` [PATCH 64/64] i2c: reword i2c_algorithm in drivers " Wolfram Sang
2024-03-22 14:34   ` Bjorn Andersson
2024-03-22 15:11   ` Nicolas Ferre
2024-03-22 16:47     ` Wolfram Sang
2024-03-22 17:05       ` Guenter Roeck
2024-03-22 17:09         ` Wolfram Sang
2024-03-22 16:09   ` Andy Shevchenko
2024-03-22 16:48     ` Wolfram Sang
2024-03-22 17:00       ` Andy Shevchenko
2024-03-25  7:45   ` Oleksij Rempel
2024-03-25  7:53   ` Jarkko Nikula
2024-04-02 12:35   ` Linus Walleij
2024-03-23  9:20 ` [PATCH 00/64] i2c: reword i2c_algorithm " Andi Shyti
2024-03-26  0:36   ` Andi Shyti
2024-04-05  8:48     ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7da930c8-d6d1-47e3-b346-b0e9e75edb54@denx.de \
    --to=sr@denx.de \
    --cc=andi.shyti@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox