[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210105141536.GD4487@sirena.org.uk>
Date: Tue, 5 Jan 2021 14:15:36 +0000
From: Mark Brown <broonie@...nel.org>
To: Qing Zhang <zhangqing@...ngson.cn>
Cc: Rob Herring <robh+dt@...nel.org>,
ThomasBogendoerfer <tsbogend@...ha.franken.de>,
linux-spi@...r.kernel.org, Huacai Chen <chenhc@...ote.com>,
Jiaxun Yang <jiaxun.yang@...goat.com>, yangtiezhu@...ngson.cn,
devicetree@...r.kernel.org, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 1/4] spi: LS7A: Add Loongson LS7A SPI controller
driver support
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists