mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xianwei Zhao <xianwei.zhao@amlogic.com>
To: Markus Elfring <Markus.Elfring@web.de>,
	Junyi Zhao <junyi.zhao@amlogic.com>,
	linux-amlogic@lists.infradead.org, linux-i2c@vger.kernel.org,
	devicetree@vger.kernel.org, Andi Shyti <andi.shyti@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Rob Herring <robh@kernel.org>
Cc: Junyi Zhao <junyi.zhaol@amlogic.com>,
	Xianwei Zhao <xianwei.zhaol@amlogic.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] i2c: amlogic: Add Amlogic A9 I2C controller driver
Date: Tue, 27 Oct 2026 11:18:43 +0800	[thread overview]
Message-ID: <7bd4a0ff-7e28-4a43-b17d-6d92697b127f@amlogic.com> (raw)
In-Reply-To: <7015dc55-5f19-4a6a-89aa-d11da0190b7e@web.de>

Hi Markus,
    Thanks for your review.

On 2026/10/27 01:28, Markus Elfring wrote:
> …
>> +++ b/drivers/i2c/busses/i2c-amlogic-a9.c
>> @@ -0,0 +1,469 @@
> …
> 
> How do you think about to avoid a bit of duplicate source code?
> 
This one has a different IP from the existing controller. They only 
share some similarities in register access, and most other logics are 
incompatible. Therefore, it is not considered for the time being.
>  > …
>> +static void aml_i2c_prepare_xfer(struct aml_i2c *i2c, enum fifo_fill_mode mode)
>> +{
> …
>> +     if (mode == A9_FIFO_FILL_FULL)
>> +             i2c->count = min(i2c->msg->len - i2c->pos, A9_I2C_FIFO_DEPTH);
>> +     else
>> +             i2c->count = min(i2c->msg->len - i2c->pos, A9_I2C_HALF_FIFO);
> …
> 
> +       i2c->count = min(i2c->msg->len - i2c->pos,
> +                        (mode == A9_FIFO_FILL_FULL ? A9_I2C_FIFO_DEPTH : A9_I2C_HALF_FIFO));
> 
> 

Will do.

> …
>> +static int aml_i2c_xfer_msg(struct aml_i2c *i2c, struct i2c_msg *msg, bool last)
>> +{
> …
>> +     if (last)
>> +             aml_i2c_set_mask(i2c, REG_CFG_BUS, BUS_NO_STOP, 0);
>> +     else
>> +             aml_i2c_set_mask(i2c, REG_CFG_BUS, BUS_NO_STOP, BUS_NO_STOP);
> …
> 
> +       aml_i2c_set_mask(i2c, REG_CFG_BUS, BUS_NO_STOP, (last ? 0 : BUS_NO_STOP));
> 

Will do.

> 
> Regards,
> Markus

      reply	other threads:[~2026-10-27  3:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22  9:26 [PATCH v2 0/2] i2c: Add driver support Amlogic A9 I2C Xianwei Zhao via B4 Relay
2026-10-22  9:26 ` [PATCH v2 1/2] dt-bindings: i2c: add Amlogic A9 I2C controller Xianwei Zhao via B4 Relay
2026-10-22  9:26 ` [PATCH v2 2/2] i2c: amlogic: Add Amlogic A9 I2C controller driver Xianwei Zhao via B4 Relay
2026-10-26 15:22   ` Andi Shyti
2026-10-27  2:59     ` Xianwei Zhao
2026-10-26 17:28   ` Markus Elfring
2026-10-27  3:18     ` Xianwei Zhao [this message]

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=7bd4a0ff-7e28-4a43-b17d-6d92697b127f@amlogic.com \
    --to=xianwei.zhao@amlogic.com \
    --cc=Markus.Elfring@web.de \
    --cc=andi.shyti@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=junyi.zhao@amlogic.com \
    --cc=junyi.zhaol@amlogic.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=xianwei.zhaol@amlogic.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

all inboxes | Powered by JetHome®