Re: [PATCH v3 1/6] spi: Add SPI mode bit for MOSI idle state configuration

From: Mark Brown
Date: Wed Jun 05 2024 - 08:28:09 EST


On Wed, Jun 05, 2024 at 11:14:33AM +0200, Nuno Sá wrote:
> On Tue, 2024-06-04 at 19:41 -0300, Marcelo Schmitt wrote:

> > + /* Check against conflicting MOSI idle configuration */
> > + if ((spi->mode & SPI_MOSI_IDLE_LOW) && (spi->mode &
> > SPI_MOSI_IDLE_HIGH)) {
> > + dev_warn(&spi->dev,
> > + "setup: erratic MOSI idle configuration. Set to idle
> > low\n");
> > + spi->mode &= ~SPI_MOSI_IDLE_HIGH;
> > + }

> Should we assume such a thing? IOW, should this be treated as a warning or a
> real error? I would assume this should be a configuration error and return -
> EINVAL but...

Right, and the error message isn't very clear.

Attachment: signature.asc
Description: PGP signature