mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>,
	Peter Korsgaard <peter@korsgaard.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux@ew.tq-group.com
Subject: Re: [PATCH v2 1/2] i2c: ocores: increase poll timeout to total transfer timeout
Date: Tue, 13 Jan 2026 15:21:02 +0100	[thread overview]
Message-ID: <f428f437-80ec-4587-9f6a-7508a8153e79@lunn.ch> (raw)
In-Reply-To: <aWZCT0JQfvX1LAMC@ninjato>

On Tue, Jan 13, 2026 at 02:02:07PM +0100, Wolfram Sang wrote:
> 
> > The behavior in the regular case is unchanged, spinning for up to 1ms,
> > but the open-coded poll loop is replaced with read_poll_timeout_atomic()
> > as suggested by Andrew Lunn.
> 
> Hmm, spinning 1ms is still a lot. Can't we just use read_poll_timeout()
> for the whole timeout? I can't see that it will cause a regression. But
> please correct me if I am wrong.

I've forgotten the context, but

/**
 * ocores_poll_wait() - Wait until is possible to process some data
 * @i2c: ocores I2C device instance
 *
 * Used when the device is in polling mode (interrupts disabled).

If interrupts are disabled, you cannot use read_poll_timeout().  You
have to use read_poll_timeout_atomic(). And that spins anyway.

     Andrew

  reply	other threads:[~2026-01-13 14:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-09  9:19 Matthias Schiffer
2025-10-09  9:19 ` [PATCH v2 2/2] i2c: ocores: respect adapter timeout in IRQ mode Matthias Schiffer
2025-10-09 13:21   ` Andrew Lunn
2025-10-09 13:20 ` [PATCH v2 1/2] i2c: ocores: increase poll timeout to total transfer timeout Andrew Lunn
2025-10-09 13:26   ` Matthias Schiffer
2025-12-10  8:51     ` Matthias Schiffer
2026-01-13 13:02 ` Wolfram Sang
2026-01-13 14:21   ` Andrew Lunn [this message]
2026-01-14  8:28     ` Matthias Schiffer
2026-01-14  9:34       ` Wolfram Sang

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=f428f437-80ec-4587-9f6a-7508a8153e79@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andi.shyti@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@ew.tq-group.com \
    --cc=matthias.schiffer@ew.tq-group.com \
    --cc=peter@korsgaard.com \
    --cc=wsa+renesas@sang-engineering.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®