Re: [PATCH 1/2 v2] spi: add SPI_MOSI_IDLE_LOW support from device tree

From: Couret Charles-Antoine

Date: Tue Mar 31 2026 - 19:08:53 EST


Hi Marcelo,
Le 29/03/26 à 21:29, Marcelo Schmitt a écrit :
For example we used that to communicate with TI DAC161P997 device, where
"IDLE low" setting can be used to detect when the device is really powered
or not. But this is an optional setting, this option does not affect the
rest of the driver.
Can't that be done with the existing support for idle modes? E.g.
spi->mode |= SPI_MOSI_IDLE_LOW;
ret = spi_setup(spi);
if (ret < 0) {
/* No controller MOSI idle low support. */
/* Can't verify device is powered on. Return or do something else. */
}
/* MOSI idle low support. Verify the device is powered on. */

This means we need to hardcode the behaviour in the driver or to add an extra setting if we don't especially want to enable this.

I agree with you: there is always a way to deal with it without this property in the device tree. However, I don't think this means the property in the device tree is irrelevant.

Regards,

--

Charles-Antoine Couret

Embedded Software Developer

+32 488 27 56 40
Website <https://mind.be> • LinkedIn <https://www.linkedin.com/company/mind_essensium/> • Newslette <http://eepurl.com/h-gy7v>r