mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Thilo Zirnstein <thi.zirnstein@gmail.com>,
	andi.shyti@kernel.org,
	Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 0/2] i2c: i2c-xiic: fix clearing of bnb irq and waiting/ clearing while atomic
Date: Fri, 6 Nov 2026 15:30:31 +0100	[thread overview]
Message-ID: <092f0494-97ae-445c-be55-67e761cedbd8@amd.com> (raw)
In-Reply-To: <20261102093228.2751576-1-thi.zirnstein@gmail.com>

+Shubhrajyoti,

On 11/2/26 10:32, Thilo Zirnstein wrote:
> Dear all,
> 
> This patch-series fixes the clearing routine for the bus not busy (bnb) irq
> plus the waiting and clearing routines while in atomic context.
> 
> The bnb is used to indicate that the current transfer is done.
> A high level view of the software flow for tx:
> 
> * init i2c controller
> * prepare all registers ( fill fifo, enable irqs, ... )
> * start i2c txfer
> * clear and enable bnb
> * wait for completion
> * ( serve interrupts )
> * ( bnb interrupt ): complete completion
> 
> The datasheet ( pg090-axi-iic, Interrupt-Status-Register ISR)
> states that the bnb bit can only be cleared if
> the bus busy bit in the status register is set.
> So the iic controller must have recognized that their is some activity
> on the bus. ( Start condition )
> 
> Currently the bnb bit is cleared without checking or waiting for this
> condition. This can lead to spurious bnb interrupts.
> 
> Andi suggested to use an atomic-save function to wait for bnb.
> This was applied for other waiting/ clearing functions, too.
> 
> Kind regards,
> 
> Thilo Zirnstein
> ---
> Changes in v4
> - Fix timeout argument of polling in atomic context
> 
> Changes in v3
> - Use atomic-save functions for waiting and clearing.
> - Fix intendation
> - Unintentional changes removed
> 
> Changes in v2:
> - Unintentional changes removed.
> ---
> 
> Thilo Zirnstein (2):
>    i2c: i2c-xiic: fix clearing of bnb irq
>    i2c: i2c-xiic: fix waiting/clearing while atomic
> 
>   drivers/i2c/busses/i2c-xiic.c | 70 ++++++++++++++++++++++++++++-------
>   1 file changed, 57 insertions(+), 13 deletions(-)
> 
Shubhrajyoti: Please review this patch.

Thanks,
Michal


      parent reply	other threads:[~2026-11-06 14:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02  9:32 Thilo Zirnstein
2026-11-02  9:32 ` [PATCH v4 1/2] i2c: i2c-xiic: fix clearing of bnb irq Thilo Zirnstein
2026-11-02  9:32 ` [PATCH v4 2/2] i2c: i2c-xiic: fix waiting/clearing while atomic Thilo Zirnstein
2026-11-06 14:30 ` Michal Simek [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=092f0494-97ae-445c-be55-67e761cedbd8@amd.com \
    --to=michal.simek@amd.com \
    --cc=andi.shyti@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shubhrajyoti.datta@amd.com \
    --cc=thi.zirnstein@gmail.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®