public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: linux-i2c@vger.kernel.org, devicetree-spec@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Chris Packham <chris.packham@alliedtelesis.co.nz>
Subject: Re: dtschema: i2c: messy situation about timeouts
Date: Tue, 27 Feb 2024 08:12:15 +0100	[thread overview]
Message-ID: <Zd2LT-OM4KkUXCXn@ninjato> (raw)
In-Reply-To: <c6yyhxzqfavqjphumemgjn7ick4ddjzhlxfjb6wtgsfvdetdqt@radooxy4o4mx>

[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]

Hi Andi,

> > - "i2c-scl-has-clk-low-timeout"
> > 
> > AFAIU this binding tells that the controller can do clock stretching.
> > But what for?
> 
> One of the controllers that was sent a while back required some
> hardware description because, in some versions, clock stretching
> was supported in the hardware.

I see. Still, I think this can (and should be handled) with
I2C_AQ_NO_CLK_STRETCH.

> The naming is a bit fancy, but it depends on the specification
> used as a reference; SMBus, I2C, or specific drivers often refer
> to it differently.

Yes. I'd give I2C specs most importance, controller documentation least.
And probably a salt of personal preference :)

> > - "i2c-scl-clk-low-timeout-us"
> > 
> > The description says "Number of microseconds the clock line needs to be
> > pulled down in order to force a waiting state." What does "forcing a
> > waiting state" mean here? I don't understand this description.
> 
> It comes from the specification. The clock stretching is given as
> an interval that can be tweaked depending on the hardware.

You mean the maximum clock stretching is tweakable? That, in deed, could
be a binding in the future, in theory. Yet, it would need support in the
client drivers. Like a touchscreen driver which assumes a reset after a
certain time of inactivity.

> So far I haven't seen anyone using it, though.

The MPC driver used it, just for a different purpose.  It was used for a
timeout of the total transfer. That's a different thing. So, I suggested
the conversion.

Happy hacking,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-02-27  7:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 10:08 dtschema: i2c: messy situation about timeouts Wolfram Sang
2024-02-26 14:45 ` Rob Herring
2024-02-26 21:16   ` Wolfram Sang
2024-02-26 20:20 ` Chris Packham
2024-02-26 21:24   ` Wolfram Sang
2024-02-27  0:03 ` Andi Shyti
2024-02-27  7:12   ` Wolfram Sang [this message]
2024-02-27 12:57     ` 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=Zd2LT-OM4KkUXCXn@ninjato \
    --to=wsa@kernel.org \
    --cc=andi.shyti@kernel.org \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=devicetree-spec@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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