public inbox for linux-i3c@lists.infradead.org
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Dylan Hung <dylan_hung@aspeedtech.com>,
	"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
	"joel@jms.id.au" <joel@jms.id.au>,
	 "u.kleine-koenig@pengutronix.de"
	<u.kleine-koenig@pengutronix.de>,
	"gustavoars@kernel.org" <gustavoars@kernel.org>,
	"krzysztof.kozlowski@linaro.org" <krzysztof.kozlowski@linaro.org>,
	"zenghuchen@google.com" <zenghuchen@google.com>,
	"matt@codeconstruct.com.au" <matt@codeconstruct.com.au>,
	 "linux-i3c@lists.infradead.org" <linux-i3c@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: BMC-SW <BMC-SW@aspeedtech.com>
Subject: Re: [PATCH] i3c: dw: Disable IBI IRQ depends on hot-join and SIR enabling
Date: Mon, 06 May 2024 13:09:35 +0800	[thread overview]
Message-ID: <645d4f645b1296d54573c4fe734768adab160035.camel@codeconstruct.com.au> (raw)
In-Reply-To: <TYZPR06MB65675E5D43EE265DD702E5689C182@TYZPR06MB6567.apcprd06.prod.outlook.com>

Hi Dylan,

Thanks for the response! I have a couple of follow-up things though:

> > My interpretation of this change is that we keep the "global" IBI irq enabled if
> > hot-join-nack is set (ie, always, because we don't support hot join, and
> > configure the hardware to nack all hot join requests).
> > 
> I would like to clarify the control logic, incorporating the principle
> of disabling the SIR interrupt signal:
> 
> Case 1:
> When `DEV_CTRL_HOT_JOIN_NACK` is set, indicating `hj_rejected` is
> true, it signifies the controller's non-receptiveness to the hot-join
> event. Consequently, we can safely disable the SIR interrupt signal if
> none of the target devices request SIR (reg == 0xffffffff).
> 
> Case 2:
> When `DEV_CTRL_HOT_JOIN_NACK` is unset, indicating `hj_rejected` is
> false, this indicates the controller's readiness to engage with the
> hot-join event. Therefore, it's imperative to keep the SIR interrupt
> signal enabled, even if not all target devices request SIR. In this
> case, `global` is false and `enable` is false.

Yep, I see what you're doing there, but it looks like the correct state
would never be set if we're not enabling/disabling the IBIs separately;
with this code, we would only ever enable the SIR for the HJ if we
*also* happen to enable IBIs.

The initial state would be to have all SIRs masked.

> Billy recently submitted a change to implement the hot-join enabling/disabling. Therefore, it is timely to consider the hot-join functionality.
> https://patchwork.kernel.org/project/linux-i3c/patch/20240429073624.256830-1-billy_tsai@aspeedtech.com/

Yep, I saw that, excellent! It's next on my list to take a look at.

It's just a little unusual that we're enabling the HJ interrupt before
actually having the HJ support though.

Cheers,


Jeremy

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

  reply	other threads:[~2024-05-06  5:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19  5:45 [PATCH] i3c: dw: Disable IBI IRQ depends on hot-join and SIR enabling Dylan Hung
2024-02-18 23:32 ` Alexandre Belloni
2024-05-01  6:22 ` Jeremy Kerr
2024-05-02  5:24   ` Dylan Hung
2024-05-06  5:09     ` Jeremy Kerr [this message]
2024-05-06  5:48       ` Dylan Hung
2024-05-06  6:58         ` Jeremy Kerr

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=645d4f645b1296d54573c4fe734768adab160035.camel@codeconstruct.com.au \
    --to=jk@codeconstruct.com.au \
    --cc=BMC-SW@aspeedtech.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=dylan_hung@aspeedtech.com \
    --cc=gustavoars@kernel.org \
    --cc=joel@jms.id.au \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=zenghuchen@google.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