From: Wolfram Sang <wsa@the-dreams.de>
To: "Jan Kundrát" <jan.kundrat@cesnet.cz>
Cc: linux-i2c@vger.kernel.org,
"Haavard Skinnemoen" <hskinnemoen@gmail.com>,
"Ben Dooks" <ben.dooks@codethink.co.uk>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH] i2c: gpio: Enable working over slow can_sleep GPIOs
Date: Thu, 4 Jan 2018 01:03:47 +0100 [thread overview]
Message-ID: <20180104000347.vmkedndw4tygdqfl@ninjato> (raw)
In-Reply-To: <f105ae7f6b9ae9f5a26ecdac8d71c55dfedfe688.1513979394.git.jan.kundrat@cesnet.cz>
[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]
On Fri, Dec 22, 2017 at 10:47:16PM +0100, Jan Kundrát wrote:
> "Slow" GPIOs (usually those connected over an SPI or an I2C bus) are,
> well, slow in their operation. It is generally a good idea to avoid
> using them for time-critical operation, but sometimes the hardware just
> sucks, and the software has to cope. In addition to that, the I2C bus
> itself does not actually define any strict timing limits; the bus is
> free to go all the way down to DC. The timeouts (and therefore the
> slowest acceptable frequency) are present only in SMBus.
>
> The `can_sleep` is IMHO a wrong concept to use here. My SPI-to-quad-UART
> chip (MAX14830) is connected via a 26MHz SPI bus, and it happily drives
> SCL at 200kHz (5µs pulses) during my benchmarks. That's faster than the
> maximal allowed speed of the traditional I2C.
>
> The previous version of this code did not really block operation over
> slow GPIO pins, anyway. Instead, it just resorted to printing a warning
> with a backtrace each time a GPIO pin was accessed, thereby slowing
> things down even more.
>
> Finally, it's not just me. A similar patch was originally submitted in
> 2015 [1].
>
> [1] https://patchwork.ozlabs.org/patch/450956/
>
> Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-01-04 0:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-22 21:47 [PATCH] i2c: gpio: Enable working over slow can_sleep GPIOs Jan Kundrát
2017-12-22 22:22 ` Uwe Kleine-König
2018-01-04 0:03 ` Wolfram Sang [this message]
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=20180104000347.vmkedndw4tygdqfl@ninjato \
--to=wsa@the-dreams.de \
--cc=ben.dooks@codethink.co.uk \
--cc=hskinnemoen@gmail.com \
--cc=jan.kundrat@cesnet.cz \
--cc=linux-i2c@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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