All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Dmitry Guzman" <Dmitry.Guzman@mobileye.com>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH RFC v3 11/14] i2c: nomadik: save I2C_CR register before resetting HW in IRQ handler
Date: Thu, 05 Nov 2026 17:53:55 +0000	[thread overview]
Message-ID: <sashiko-outbox-199668@kernel.org> (raw)
In-Reply-To: <20261105-i2c-fault-reporting-v3-11-515ad74ac4c9@mobileye.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] i2c: nomadik: commit subject refers to I2C_CR register instead of I2C_SR
--

commit d218bb5af34fbc63fe8a8b9dff6e05c3496a8824
Author: Dmitry Guzman <Dmitry.Guzman@mobileye.com>

i2c: nomadik: save I2C_CR register before resetting HW in IRQ handler

This commit adds an i2c_sr field to struct nmk_i2c_dev to save the
I2C_SR status register value in i2c_irq_handler() before calling
init_hw(), preserving the status for fault reporting in
nmk_i2c_xfer_one().

>     i2c: nomadik: save I2C_CR register before resetting HW in IRQ handler
>     
>     On some interrupts, such as Bus Error interrupt or Arbitration Lost
>     interrupt, the interrupt handler calls init_hw() to reset the I2C
>     controller. This clears I2C_SR register value that might be used for
>     fault reporting.
>     
>     Add i2c_sr field to nmk_i2c_dev structure, store there I2C_SR register
>     value before resetting the hardware, and use this value instead of
>     reading it directly in nmk_i2c_xfer_one() if it was read in IRQ handler.
>     
>     Signed-off-by: Dmitry Guzman <Dmitry.Guzman@mobileye.com>

[Severity: Low]
This isn't a bug, but should the commit subject refer to the I2C_SR
register instead of I2C_CR? Both the commit message body and the changes
in drivers/i2c/busses/i2c-nomadik.c (in struct nmk_i2c_dev,
nmk_i2c_xfer_one(), and i2c_irq_handler()) save and inspect I2C_SR rather
than the I2C_CR control register.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261105-i2c-fault-reporting-v3-0-515ad74ac4c9@mobileye.com?part=11

  reply	other threads:[~2026-11-05 17:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 17:15 [PATCH RFC v3 00/14] I2C - detailed transfer reporting in case of a fault Dmitry Guzman
2026-11-05 17:15 ` [PATCH RFC v3 01/14] i2c: uapi: add i2c_transfer_report structure Dmitry Guzman
2026-11-05 17:15 ` [PATCH RFC v3 02/14] i2c: core: add xfer_v2() to i2c_algorithm structure Dmitry Guzman
2026-11-05 17:15 ` [PATCH RFC v3 03/14] i2c: core: add helper functions for transfer report generation Dmitry Guzman
2026-11-05 17:15 ` [PATCH RFC v3 04/14] i2c: core: add i2c_xfer_to_xfer_v2() helper function Dmitry Guzman
2026-11-05 17:15 ` [PATCH RFC v3 05/14] i2c: trace: pass message length separately in trace_i2c_reply() Dmitry Guzman
2026-11-05 17:15 ` [PATCH RFC v3 06/14] i2c: core: make i2c_check_for_quirks() return pointer to the message Dmitry Guzman
2026-11-05 17:15 ` [PATCH RFC v3 07/14] i2c: core: implement i2c_transfer_v2() - transfer with detailed reporting Dmitry Guzman
2026-11-05 17:34   ` sashiko-bot
2026-11-05 18:28   ` Andy Shevchenko
2026-11-05 17:15 ` [PATCH RFC v3 08/14] i2c: uapi: add I2C_XFER_V2 ioctl - detailed fault reporting Dmitry Guzman
2026-11-05 17:35   ` sashiko-bot
2026-11-05 17:15 ` [PATCH RFC v3 09/14] i2c: core: implement I2C_RDWR_V2 ioctl - transfer with detailed report Dmitry Guzman
2026-11-05 17:51   ` sashiko-bot
2026-11-05 17:15 ` [PATCH RFC v3 10/14] i2c: doc: add section for I2C_RDWR_V2 ioctl Dmitry Guzman
2026-11-05 17:44   ` sashiko-bot
2026-11-05 17:15 ` [PATCH RFC v3 11/14] i2c: nomadik: save I2C_CR register before resetting HW in IRQ handler Dmitry Guzman
2026-11-05 17:53   ` sashiko-bot [this message]
2026-11-06 13:25   ` Linus Walleij
2026-11-05 17:15 ` [PATCH RFC v3 12/14] i2c: nomadik: add support for I2C_XFER_V2 - detailed fault reporting Dmitry Guzman
2026-11-05 18:13   ` sashiko-bot
2026-11-05 17:15 ` [PATCH RFC v3 13/14] i2c: designware: use separate `i2c_algorithm` for AMD_NAVI_GPU Dmitry Guzman
2026-11-05 17:15 ` [PATCH RFC v3 14/14] i2c: designware: add support for I2C_XFER_V2 - detailed fault reporting Dmitry Guzman
2026-11-05 18:21   ` sashiko-bot
2026-11-05 19:12 ` [PATCH RFC v3 00/14] I2C - detailed transfer reporting in case of a fault Jonathan Cameron

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-199668@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Dmitry.Guzman@mobileye.com \
    --cc=linux-trace-kernel@vger.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.