public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	linux-spi@vger.kernel.org, NXP Linux Team <linux-imx@nxp.com>,
	Fabio Estevam <festevam@gmail.com>
Subject: Re: [PATCH v1] spi: imx: mx51-ecspi: fix clk polarity and phase configuration for CS > 4
Date: Mon, 23 May 2022 14:27:15 +0100	[thread overview]
Message-ID: <YouLs1xoxOCdyBlU@sirena.org.uk> (raw)
In-Reply-To: <20220523073143.778664-1-o.rempel@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

On Mon, May 23, 2022 at 09:31:43AM +0200, Oleksij Rempel wrote:

> -	/* set chip select to use */
> -	ctrl |= MX51_ECSPI_CTRL_CS(spi->chip_select);
> +	if (spi->cs_gpiod) {
> +		chip_select = 0;

What if someone mixed GPIO and regular chip selects and 0 is one of the
in use chip selects?  Ideally we should check for an unused chip select
here, though the current change is still an improvement since we'll at
least only write in the chip select field.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-05-23 13:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23  7:31 [PATCH v1] spi: imx: mx51-ecspi: fix clk polarity and phase configuration for CS > 4 Oleksij Rempel
2022-05-23 13:27 ` Mark Brown [this message]
2022-05-23 15:40   ` Oleksij Rempel
2022-05-26 15:51 ` Mark Brown

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=YouLs1xoxOCdyBlU@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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