mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@kernel.org>
To: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Cc: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org,
	 devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] i2c: qcom-target: Add driver for Qualcomm I2C target controller
Date: Fri, 28 Aug 2026 02:02:06 +0200	[thread overview]
Message-ID: <apDPu_uJBTT9GPmZ@zenone.zhora.eu> (raw)
In-Reply-To: <5c6b120d-f791-424b-a41a-6c82de73000f@oss.qualcomm.com>

Hi Viken,

On Thu, Aug 27, 2026 at 06:44:21PM +0530, Viken Dadhaniya wrote:
> On 8/26/2026 7:27 PM, Andi Shyti wrote:
> > ...
> > 
> >> +static void qcom_i2c_target_hw_reset(struct qcom_i2c_target *target)
> >> +{
> >> +	/* Clear error bits before SW_RESET; the reset may not be instantaneous */
> >> +	writel(BIT(ERR_CONDITION) | BIT(CLOCK_LOW_TIMEOUT),
> >> +	       target->base + I2C_S_IRQ_CLR);
> >> +	writel(SW_RESET, target->base + I2C_S_SW_RESET_REG);
> >> +	/*
> >> +	 * I2C_S_SW_RESET_REG is write-only so completion cannot be polled.
> >> +	 * Use a conservative delay to allow the reset to finish before
> >> +	 * reconfiguring the controller.
> >> +	 */
> >> +	usleep_range(10, 20);
> > 
> > This is also called in atomic context from the irq handler.
> > Please avoid using usleep_range(), perhaps you can put this in a
> > thread.
> > 
> 
> Thanks for the review. The delay is only 20 µs, so we were
> thinking of replacing usleep_range() with udelay() instead of
> converting to a threaded IRQ, to avoid the added complexity on
> all the normal fast paths.

perhaps before sleeping you could check the context you are
executing (with an explaining comment).

Thanks,
Andi

  reply	other threads:[~2026-08-28  0:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 15:52 [PATCH v3 0/2] Add Qualcomm I2C target controller driver Viken Dadhaniya
2026-08-13 15:52 ` [PATCH v3 1/2] dt-bindings: i2c: Add Qualcomm I2C target controller Viken Dadhaniya
2026-08-14  9:18   ` Krzysztof Kozlowski
2026-08-13 15:52 ` [PATCH v3 2/2] i2c: qcom-target: Add driver for " Viken Dadhaniya
2026-08-25  9:41   ` Konrad Dybcio
2026-08-26 12:52     ` Viken Dadhaniya
2026-08-26 13:05       ` Konrad Dybcio
2026-08-26 13:57   ` Andi Shyti
2026-08-27 13:14     ` Viken Dadhaniya
2026-08-28  0:02       ` Andi Shyti [this message]
2026-08-27 10:21   ` Mukesh Savaliya

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=apDPu_uJBTT9GPmZ@zenone.zhora.eu \
    --to=andi.shyti@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mukesh.savaliya@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=viken.dadhaniya@oss.qualcomm.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®