From: Mark Brown <broonie@kernel.org>
To: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Cc: kernel@collabora.com, linux-spi@vger.kernel.org,
enric.balletbo@collabora.com, dafna3@gmail.com,
Mason Zhang <Mason.Zhang@mediatek.com>,
Laxman Dewangan <ldewangan@nvidia.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com,
Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [PATCH] Revert "spi: modify set_cs_timing parameter"
Date: Thu, 30 Sep 2021 14:42:20 +0100 [thread overview]
Message-ID: <20210930134220.GZ4199@sirena.org.uk> (raw)
In-Reply-To: <bce800ff-9b3e-500b-6a42-9a60d3a0c590@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 2000 bytes --]
On Thu, Sep 30, 2021 at 03:06:52PM +0200, Dafna Hirschfeld wrote:
> On 30.09.21 14:46, Mark Brown wrote:
> > On Thu, Sep 30, 2021 at 02:36:01PM +0200, Dafna Hirschfeld wrote:
> > > Actually the original commit not only change that callback 'set_cs_timing' but it also
> > > calls 'mtk_spi_set_hw_cs_timing' directly from the function "mtk_spi_prepare_message".
> > > So this actually influences all devices bound to this driver (in upstream)
> > > I did some printing and it does change values that are written to registers.
> > OK, so that's something that should have been in the commit log,
> > preferrably in a more detailed form that identifies what the change is.
> > However changing the values written out is clearly not the intent of the
> > patch and it is a substantially better API so can we not just fix things
> > so that the old values are written out? Why are we jumping straight to
> > a revert here?
> It could be that the values written to the register in the new version of "mtk_spi_set_hw_cs_timing" are the same
> as with the previous version. I didn't check that. The difference is that before that patch
> the function was not called so it was a dead code. Now it is called and causes erros.
> Without the datasheet it is hard to know how to fix it. I responded to that patch two days ago explaining
> that but Mason Zhang didn't respond yet.
The hardware supports register readback (it's doing a read/modify/write
to set the new values) so it should be possible to look at what the
default values that get written out are and work out what the default
parameters should be set to to give the same effect (instead of 1 which
is what's currently used). I would say just skip the delays if they are
zero but that means that if only one device on a bus has a delay
configured there'd be problems.
Please fix your mail client to word wrap within paragraphs at something
substantially less than 80 columns. Doing this makes your messages much
easier to read and reply to.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2021-09-30 13:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-30 12:07 [PATCH] Revert "spi: modify set_cs_timing parameter" Dafna Hirschfeld
2021-09-30 12:25 ` Mark Brown
2021-09-30 12:36 ` Dafna Hirschfeld
2021-09-30 12:46 ` Mark Brown
2021-09-30 13:06 ` Dafna Hirschfeld
2021-09-30 13:42 ` Mark Brown [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=20210930134220.GZ4199@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Mason.Zhang@mediatek.com \
--cc=dafna.hirschfeld@collabora.com \
--cc=dafna3@gmail.com \
--cc=enric.balletbo@collabora.com \
--cc=kernel@collabora.com \
--cc=ldewangan@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=wsd_upstream@mediatek.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