public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Krzysztof Hałasa" <khalasa@piap.pl>
To: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Stefan Lengfeld <contact@stefanchrist.eu>,
	linux-media <linux-media@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Oleksij Rempel <linux@rempel-privat.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-i2c@vger.kernel.org
Subject: Re: Sony IMX290/462 image sensors I2C xfer peculiarity
Date: Wed, 11 Oct 2023 14:18:20 +0200	[thread overview]
Message-ID: <m3bkd5tks3.fsf@t19.piap.pl> (raw)
In-Reply-To: <2905840.e9J7NaK4W3@steina-w> (Alexander Stein's message of "Wed, 11 Oct 2023 13:59:50 +0200")

Hi Alexander,

Alexander Stein <alexander.stein@ew.tq-group.com> writes:

> I assume that the master clock is running independently to I2C from the SoC 
> the sensor is attached to. Your calculations indicate you are assuming ~400kHz 
> I2C clock frequency.

This is correct.

> But nothing is preventing that sensor from running on a 100kHz I2C bus. Even 
> this "atomic" hack will not be sufficient in that case.

It will be sufficient. Even if all times are 4x longer (they shouldn't
since the CPU won't get slower), they wouldn't reach, say, 1200 us.
There would still be quite a lot of a margin (the timeout is 7 ms).
Even with the faster MCLK (these sensors can operate on 37.125 and on
74.250 MHz) and IF the timeout is still 2^18 in the latter case (meaning
3.5 ms), it would most probably work.

Of course, the atomic hack is not meant for general consumption (at
least for now in its current shape), only the udelay() reduction
(100 -> 1) could probably go in.
-- 
Krzysztof "Chris" Hałasa

Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa

  reply	other threads:[~2023-10-11 12:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29 10:53 Sony IMX290/462 image sensors I2C xfer peculiarity Krzysztof Hałasa
2023-09-29 13:33 ` Dave Stevenson
2023-10-03 12:59   ` Krzysztof Hałasa
2023-10-10  9:46     ` Krzysztof Hałasa
2023-10-11  9:10       ` Krzysztof Hałasa
2023-10-11  9:50         ` Krzysztof Hałasa
2023-10-11 10:15           ` Stefan Lengfeld
2023-10-11 11:25             ` Krzysztof Hałasa
2023-10-11 11:59               ` Alexander Stein
2023-10-11 12:18                 ` Krzysztof Hałasa [this message]
2023-10-12 22:01               ` Stefan Lengfeld
2023-10-13  7:17                 ` Wolfram Sang
2023-10-13 10:39                 ` Krzysztof Hałasa

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=m3bkd5tks3.fsf@t19.piap.pl \
    --to=khalasa@piap.pl \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=contact@stefanchrist.eu \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@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