[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220523154027.GD20227@pengutronix.de>
Date: Mon, 23 May 2022 17:40:27 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Mark Brown <broonie@...nel.org>
Cc: Fabio Estevam <festevam@...il.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
linux-kernel@...r.kernel.org, linux-spi@...r.kernel.org,
NXP Linux Team <linux-imx@....com>, kernel@...gutronix.de,
Shawn Guo <shawnguo@...nel.org>
Subject: Re: [PATCH v1] spi: imx: mx51-ecspi: fix clk polarity and phase
configuration for CS > 4
On Mon, May 23, 2022 at 02:27:15PM +0100, Mark Brown wrote:
> 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.
In case some HW variant has real issue with it, we will need to reduce
amount of supported HW CS and use blacklisted one for GPIOs.
Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists