From: Mark Brown <broonie@kernel.org>
To: kostap@marvell.com
Cc: linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
robh+dt@kernel.org, mw@semihalf.com, jaz@semihalf.com,
nadavh@marvell.com, bpeled@marvell.com, stefanc@marvell.com
Subject: Re: [PATCH v2 2/2] spi: orion: enable support for switching CS every transferred byte
Date: Thu, 17 Dec 2020 17:42:52 +0000 [thread overview]
Message-ID: <20201217174252.GH4708@sirena.org.uk> (raw)
In-Reply-To: <20201217170933.10717-3-kostap@marvell.com>
[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]
On Thu, Dec 17, 2020 at 07:09:32PM +0200, kostap@marvell.com wrote:
> +++ b/drivers/spi/spi-orion.c
> @@ -369,8 +369,15 @@ orion_spi_write_read_8bit(struct spi_device *spi,
> {
This is only supporting SPI_CS_WORD for 8 bit operations but the driver
also supports 16 bit words, it should at least report an error if
there's an attempt to use SPI_CS_WORD for 16 bit transfers. It also
looks like this won't work on systems where direct access is supported
since those use a separate I/O path, that can be fixed by just adding an
additional check when deciding to go down that path.
The driver should also pay attention to SPI_CS_HIGH if it's going to try
to control chip select by hand as it does, which is generally frowned
upon. TBH I'm wondering if it might not be better to just rely on the
core support for implementing SPI_CS_WORD on controllers that can't do
it in hardware - it *is* much higher overhead since it needs to split
the transfers up but it depends how performance critical and frequent
access to such devices is likely to be.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-12-17 17:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 17:09 [PATCH v2 0/2] spi: new feature and fix for Marvell Orion driver kostap
2020-12-17 17:09 ` [PATCH v2 1/2] spi: orion: enable clocks before spi_setup kostap
2020-12-17 17:25 ` Mark Brown
2020-12-22 12:46 ` [EXT] " Kostya Porotchkin
2020-12-22 16:56 ` Mark Brown
2020-12-17 17:09 ` [PATCH v2 2/2] spi: orion: enable support for switching CS every transferred byte kostap
2020-12-17 17:42 ` Mark Brown [this message]
2020-12-17 17:09 ` [PATCH v2 0/2] spi: new feature and fix for Marvell Orion driver kostap
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=20201217174252.GH4708@sirena.org.uk \
--to=broonie@kernel.org \
--cc=bpeled@marvell.com \
--cc=devicetree@vger.kernel.org \
--cc=jaz@semihalf.com \
--cc=kostap@marvell.com \
--cc=linux-spi@vger.kernel.org \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=robh+dt@kernel.org \
--cc=stefanc@marvell.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;
as well as URLs for NNTP newsgroup(s).