From: Mark Brown <broonie@kernel.org>
To: zhuyinbo <zhuyinbo@loongson.cn>
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Jianmin Lv <lvjianmin@loongson.cn>,
wanghongliang@loongson.cn, Liu Peibao <liupeibao@loongson.cn>,
loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH v1 2/2] spi: loongson: add bus driver for the loongson spi controller
Date: Fri, 10 Mar 2023 12:56:11 +0000 [thread overview]
Message-ID: <ZAso695fdT3ngjqf@sirena.org.uk> (raw)
In-Reply-To: <fb502e11-a12f-58ca-4171-edec55b71fa5@loongson.cn>
[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]
On Fri, Mar 10, 2023 at 06:01:23PM +0800, zhuyinbo wrote:
> 在 2023/3/8 下午11:03, Mark Brown 写道:
> > On Wed, Mar 08, 2023 at 10:59:08AM +0800, Yinbo Zhu wrote:
> > > + hz = t ? t->speed_hz : spi->max_speed_hz;
> > Please write normal conditional statements so that things are legible,
> > though in this case the core will ensure that there's a speed_hz in
> > every transfer so there's no need for any of the logic around ensuring
> > it's set.
> Do you mean to achieve the following ? and drop spi->max_speed_hz.
> if (t)
>
> hz = t->speed_hz;
Yes.
> > > + loongson_spi_update_state(loongson_spi, spi, NULL);
> > > + loongson_spi_set_cs(loongson_spi, spi, 1);
> > Note that setup() needs to be able to run for one device while there are
> > transfers for other devices on the same controller active.
> okay, I will add a spin_lock for it.
We also need to take care not to change the hardware
configuration for the currently running transfer (can't
remember if that's an issue here or not, but it's a common
one).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2023-03-10 12:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 2:59 [PATCH v1 0/2] spi: loongson: add bus driver for the loongson spi Yinbo Zhu
2023-03-08 2:59 ` [PATCH v1 1/2] dt-bindings: spi: add " Yinbo Zhu
2023-03-08 11:30 ` Krzysztof Kozlowski
2023-03-09 2:08 ` zhuyinbo
2023-03-09 6:23 ` Krzysztof Kozlowski
2023-03-09 7:22 ` zhuyinbo
2023-03-13 2:09 ` zhuyinbo
2023-03-13 6:42 ` Krzysztof Kozlowski
2023-03-08 14:06 ` Rob Herring
2023-03-10 2:31 ` zhuyinbo
2023-03-10 9:08 ` Krzysztof Kozlowski
2023-03-10 9:33 ` zhuyinbo
2023-03-08 2:59 ` [PATCH v1 2/2] spi: loongson: add bus driver for the loongson spi controller Yinbo Zhu
2023-03-08 15:03 ` Mark Brown
2023-03-10 10:01 ` zhuyinbo
2023-03-10 12:56 ` 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=ZAso695fdT3ngjqf@sirena.org.uk \
--to=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=liupeibao@loongson.cn \
--cc=loongson-kernel@lists.loongnix.cn \
--cc=lvjianmin@loongson.cn \
--cc=robh+dt@kernel.org \
--cc=wanghongliang@loongson.cn \
--cc=zhuyinbo@loongson.cn \
/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