From: Mark Brown <broonie@kernel.org>
To: Colin Foster <colin.foster@in-advantage.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Asymmetric regmap read/write reg
Date: Fri, 11 Mar 2022 13:26:29 +0000 [thread overview]
Message-ID: <YitOBbJd4mY3hjSA@sirena.org.uk> (raw)
In-Reply-To: <20220310215408.GA3149079@euler>
[-- Attachment #1: Type: text/plain, Size: 908 bytes --]
On Thu, Mar 10, 2022 at 01:54:08PM -0800, Colin Foster wrote:
> The Ocelot chip has requires 100ns between address write and when the
> address is ready to be clocked out. This can be dealt with in three
> different ways:
> 1. Use a slow enough clock speed
> 2. Use a delay between address write and value read
> 3. Clock out N padding bytes to account for the 100ns access time
>
> Forcing a slow clock speed is obviously not ideal, and forcing a delay
> between "write_then_read" sounds too driver-specific, so option 3 seems
> like the best option - especially if bulk reads are utilized.
>
> Where regmap comes in is specifically the padding bytes. Reads require
Why not implement this using a delay? That seems both more
straightforward and likely tending to be more accurate given that clock
rates for SPI devices tend to be a bit vague. Much less disruptive to
implement too.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-03-11 13:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 21:54 Asymmetric regmap read/write reg Colin Foster
2022-03-11 13:26 ` Mark Brown [this message]
2022-03-11 19:27 ` Colin Foster
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=YitOBbJd4mY3hjSA@sirena.org.uk \
--to=broonie@kernel.org \
--cc=colin.foster@in-advantage.com \
--cc=linux-kernel@vger.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