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

Mark Brown
2024-06-05T12:02:11Z

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

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]