From: Mark Brown <broonie@kernel.org>
To: Qing Zhang <zhangqing@loongson.cn>
Cc: Rob Herring <robh+dt@kernel.org>,
ThomasBogendoerfer <tsbogend@alpha.franken.de>,
linux-spi@vger.kernel.org, Huacai Chen <chenhc@lemote.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
yangtiezhu@loongson.cn, devicetree@vger.kernel.org,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/4] spi: LS7A: Add Loongson LS7A SPI controller driver support
Date: Tue, 5 Jan 2021 14:15:36 +0000 [thread overview]
Message-ID: <20210105141536.GD4487@sirena.org.uk> (raw)
In-Reply-To: <1609124381-9107-1-git-send-email-zhangqing@loongson.cn>
[-- Attachment #1: Type: text/plain, Size: 469 bytes --]
On Mon, Dec 28, 2020 at 10:59:38AM +0800, Qing Zhang wrote:
> + if (!!(spi->mode & SPI_CS_HIGH) == enable)
> + ls7a_spi_write_reg(ls7a_spi, SFC_SOFTCS, (0x1 << spi->chip_select) | cs);
> + else
> + ls7a_spi_write_reg(ls7a_spi, SFC_SOFTCS, (0x11 << spi->chip_select) | cs);
> +}
The core will handle inverting the chip select for the driver when
SIP_CS_HIGH so doing it again here will cause bugs. Just use the value
of enable directly. Otherwise this looks good.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2021-01-05 14:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-28 2:59 [PATCH v6 1/4] spi: LS7A: Add Loongson LS7A SPI controller driver support Qing Zhang
2020-12-28 2:59 ` [PATCH v6 2/4] spi: ls7a: Add YAML schemas Qing Zhang
2021-01-08 3:40 ` Rob Herring
2020-12-28 2:59 ` [PATCH v6 3/4] MIPS: Loongson64: DTS: Add SPI support to LS7A Qing Zhang
2020-12-28 2:59 ` [PATCH v6 4/4] MIPS: Loongson: Enable Loongson LS7A SPI in loongson3_defconfig Qing Zhang
2020-12-28 8:40 ` [PATCH v6 1/4] spi: LS7A: Add Loongson LS7A SPI controller driver support Oleksij Rempel
2021-01-05 14:15 ` 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=20210105141536.GD4487@sirena.org.uk \
--to=broonie@kernel.org \
--cc=chenhc@lemote.com \
--cc=devicetree@vger.kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=yangtiezhu@loongson.cn \
--cc=zhangqing@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