From: sashiko-bot@kernel.org
To: "Fil Dunsky" <filipp.dunsky@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 2/2] i2c: Add Cortina Systems CS75xx I2C controller driver
Date: Fri, 20 Nov 2026 06:58:31 +0000 [thread overview]
Message-ID: <sashiko-outbox-224586@kernel.org> (raw)
In-Reply-To: <20261120-cs75xx-i2c-v5-2-03bec242a549@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] i2c: cs75xx: unused CS75XX_I2C_CTRL_DONE macro in
cs75xx_i2c_isr()
--
commit 3aed5f86a535b38a31abe106e39e42d273af7fd9
Author: Fil Dunsky <filipp.dunsky@gmail.com>
i2c: Add Cortina Systems CS75xx I2C controller driver
This commit adds an I2C bus driver for the byte-oriented Bi-Wire controller on
Cortina Systems CS75xx SoCs.
> diff --git a/drivers/i2c/busses/i2c-cs75xx.c b/drivers/i2c/busses/i2c-cs75xx.c
> new file mode 100644
> index 0000000000000..69e4c9b01d15f
> --- /dev/null
> +++ b/drivers/i2c/busses/i2c-cs75xx.c
> @@ -0,0 +1,394 @@
[ ... ]
> +#define CS75XX_I2C_CTRL_DONE BIT(0)
> +#define CS75XX_I2C_CTRL_NACK BIT(3)
> +#define CS75XX_I2C_CTRL_WRITE BIT(4)
> +#define CS75XX_I2C_CTRL_READ BIT(5)
> +#define CS75XX_I2C_CTRL_STOP BIT(6)
> +#define CS75XX_I2C_CTRL_START BIT(7)
[ ... ]
> +static irqreturn_t cs75xx_i2c_isr(int irq, void *dev_id)
> +{
> + struct cs75xx_i2c *i2c = dev_id;
> + u32 ctrl, ack;
> +
> + guard(spinlock)(&i2c->lock);
> +
> + if (!(readl(i2c->base + CS75XX_I2C_INT) & CS75XX_I2C_INT_DONE))
> + return IRQ_NONE;
> +
> + writel(CS75XX_I2C_INT_DONE, i2c->base + CS75XX_I2C_INT);
> +
> + /* The done flag is cleared by writing it back */
> + ctrl = readl(i2c->base + CS75XX_I2C_CTRL);
> + writel(ctrl, i2c->base + CS75XX_I2C_CTRL);
[Severity: Low]
Should this write CS75XX_I2C_CTRL_DONE to CS75XX_I2C_CTRL instead of writing
back the full ctrl value? CS75XX_I2C_CTRL_DONE is defined above but never
used, and writing the whole register back could re-assert any control bits in
CS75XX_I2C_CTRL that do not self-clear.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120-cs75xx-i2c-v5-0-03bec242a549@gmail.com?part=2
prev parent reply other threads:[~2026-11-20 6:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 6:49 [PATCH v5 0/2] i2c: Add Cortina Systems CS75xx I2C controller driver Fil Dunsky
2026-11-20 6:49 ` Fil Dunsky via B4 Relay
2026-11-20 6:49 ` [PATCH v5 1/2] dt-bindings: i2c: Add Cortina Systems CS7542 I2C controller Fil Dunsky via B4 Relay
2026-11-20 6:49 ` Fil Dunsky
2026-11-20 6:49 ` [PATCH v5 2/2] i2c: Add Cortina Systems CS75xx I2C controller driver Fil Dunsky via B4 Relay
2026-11-20 6:49 ` Fil Dunsky
2026-11-20 6:58 ` sashiko-bot [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=sashiko-outbox-224586@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=filipp.dunsky@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.